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
Solved

ListBox tooltips?

Posted on 1998-09-03
2
247 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
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…

766 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