Solved

ListBox tooltips?

Posted on 1998-09-03
2
246 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
2 Comments
 
LVL 6

Accepted Solution

by:
anthonyc earned 20 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

815 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now