Click to See Complete Forum and Search --> : Suppressing TreeView "ItemTips"?
JenniferW
Nov 4th, 1999, 01:22 AM
Hi!
My question has to do with how to suppress TreeView "ItemTips?" ... I may not be calling this property by it's correct name. What I'm referring to are the small yellow windows that display an entire TreeView item when the mouse pointer is positioned over an item that extends past the TreeView Window. They look similiar to the ToolTips but it appears their function is different. So, my question is how do you suppress these ItemTips? It seems reasonable that they'd be something you could turn off. I'd really appreciate any help anyone could give me.
Thank you,
Jennifer
QWERTY
Nov 4th, 1999, 02:11 AM
It seems to work fine for me without doing anythig. I just simply put a TreeView control on a form and that's it.
What you could check is if Enabled Property of a TreeView is set to True.
------------------
Visual Basic Programmer
-----------------
PolComSoft
[This message has been edited by QWERTY (edited 11-04-1999).]
JenniferW
Nov 4th, 1999, 04:50 AM
Actually my TreeView control is working fine - it's just that those ItemTips 'pop up' for those node items that extend past the TreeView window. The big problem I'm having with them arises when the number of characters in the node item text is greater than 80 characters. The ItemTip only displays 80 characters even if my TreeView window is wider than that.
The only references I can find to "ItemTips" are for the TreeView control in Visual FoxPro -- which doesn't help me because I'm programming with VB 6 PRO.
Also, I really think that the "ItemTips" are different than the ToolTips. I used this code to test it out:
Private Sub tvTreeView1_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
Dim n As Node
Set n = tvTreeView1.HitTest(x, y)
If Not (n Is Nothing) Then
tvTreeView1.ToolTipText = "This is the text."
Else
tvTreeView1.ToolTipText = ""
End If
End Sub
And the result was that both the ItemTip and the ToolTip were displayed.
Jennifer
[This message has been edited by JenniferW (edited 11-04-1999).]
md_huhn
Jun 24th, 2002, 06:23 PM
I'm having the same problem, Did you ever figure this one out? I'de like to know.
Thanks,
M
NinjaFluke
Aug 22nd, 2002, 12:14 AM
Hiya
I got this from somewhere else on the forums a while back .....took ages to find but works great.
Just stick this in your declarations........
'kill treeview tips
Private Declare Function GetWindowLong Lib "user32.dll" Alias "GetWindowLongA" _ (ByVal hWnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLong Lib "user32.dll" Alias "SetWindowLongA" _ (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Const GWL_EXSTYLE = -20
Const GWL_HINSTANCE = -6
Const GWL_HWNDPARENT = -8
Const GWL_ID = -12
Const GWL_STYLE = -16
Const GWL_USERDATA = -21
Const GWL_WNDPROC = -4
Const DWL_DLGPROC = 4
Const DWL_MSGRESULT = 0
Const DWL_USER = 8
Const TVS_NOTOOLTIPS = &H80
'end of kill treeview tips
catxie
Oct 8th, 2002, 08:55 AM
is there any usage example for the above tips?
MartinLiss
Oct 8th, 2002, 09:55 AM
Search the forums for TVS_NOTOOLTIPS and I think you will find your answer.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.