Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

ListBox tooltips?

Posted on 1998-09-03
2
Medium Priority
?
255 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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 process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

636 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