Solved

ListBox tooltips?

Posted on 1998-09-03
2
243 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
Comment Utility
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
Comment Utility
thanx anthonyc, your answer was excellent! :o)


0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
VBA error replacing data 6 34
using Access 8 52
Best way to parse out a json string in VB6? 10 70
Spell Check in VB6 13 41
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…

772 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

12 Experts available now in Live!

Get 1:1 Help Now