?
Solved

ListBox tooltips?

Posted on 1998-09-03
2
Medium Priority
?
253 Views
Last Modified: 2012-06-21
The fact:
I have to write big text lines in a ListBox.
The problem:
I can´t  view the entire text, when i select a specific line.
Is there anyway to view the entire text...tooltip?, horizontal scroll?

thanx in advance....
MG
0
Comment
Question by:mguedes
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 6

Accepted Solution

by:
anthonyc earned 80 total points
ID: 1432750
you can do both a horizontal scroll OR a tooltip.. your choice. (by the way, no question should ever be less than 50 points)

For a tooltip,

private sub list1_click()
  if list1.listindex > -1 then
    list1.tooltiptext = list1.list(list1.listindex)
  else
    list1.tooltiptext = vbNullString
  end if
end sub

or, for a horizontal scroll:

use this sendmessage

SendMessageLong(m_lst.hwnd, LB_SETHORIZONTALEXTENT, sWidth, 0)

Where sWidth = the width you want in Pixels (not twips)
and   LB_SETHORIZONTALEXTENT = &H194
and   m_lst is the listbox
0
 

Author Comment

by:mguedes
ID: 1432751
thanx anthonyc, your answer was excellent! :o)


0

Featured Post

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question