Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how do u disable that 'tooltip' function in a treeview 1

Status
Not open for further replies.

Painkiller

Programmer
May 18, 2001
97
NL
Hi all,

When the text of a node in a treeview is greater than the width of the node, then u see a sort of tooltip displaying the full text of the node (when u put your mouse on the node). Does anyone know how I can disable this?

Thanx in advance
 
Found a better, easier way:

Code:
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" _
    (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" _
    (ByVal hwnd As Long, ByVal nIndex As Long) As Long

Const TVS_NOTOOLTIPS = &H80
Const GWL_STYLE = (-16)

' turn tooltips off
SetWindowLong TreeView1.hwnd, GWL_STYLE, GetWindowLong(TreeView1.hwnd, _
    GWL_STYLE) Or TVS_NOTOOLTIPS

' turn tooltips on
SetWindowLong TreeView1.hwnd, GWL_STYLE, GetWindowLong(TreeView1.hwnd, _
    GWL_STYLE) And (Not TVS_NOTOOLTIPS)
 
Easy, short , fast !!!
THANKS A LOT DangerPower...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top