idea to tooltip in treeview
-
- PlatinumLounger
- Posts: 4364
- Joined: 26 Apr 2010, 17:36
idea to tooltip in treeview
How to tooltip in treview on each node?
-
- Administrator
- Posts: 78577
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
-
- PlatinumLounger
- Posts: 4364
- Joined: 26 Apr 2010, 17:36
-
- Administrator
- Posts: 78577
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: idea to tooltip in treview
Perhaps you can adapt Change a TreeView control's tooltip when the mouse moves over different nodes
Best wishes,
Hans
Hans
-
- PlatinumLounger
- Posts: 4364
- Joined: 26 Apr 2010, 17:36
Re: idea to tooltip in treview
TKS bro.HansV wrote: ↑17 Sep 2022, 10:57Perhaps you can adapt Change a TreeView control's tooltip when the mouse moves over different nodes
but i need to use the balloon class.
in this case i need to chechk when the old value of nodx is changed resopect the new nodx...
i remember you use in a case the static var.
i just have this two var:
Static F As Long
Static C As Long
my code:
Code: Select all
Private Sub TreeView1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim NODX As Node
Set NODX = TreeView1.HitTest(X, Y)
If NODX Is Nothing Then
If m_bInLable Then
m_bInLable = False
TT.Title = ""
TT.TipText = ""
TT.Destroy
End If
Else
If Not m_bInLable Then
m_bInLable = True
TT.Title = "INFO"
TT.TipText = NODX
TT.Create Me.TreeView1.hwnd
End If
End If
End Sub
-
- Administrator
- Posts: 78577
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
-
- PlatinumLounger
- Posts: 4364
- Joined: 26 Apr 2010, 17:36
-
- 4StarLounger
- Posts: 563
- Joined: 27 Jun 2021, 10:46
Re: idea to tooltip in treeview
>i need to check when the old value of nodx is changed resopect the new nodx...
Something like:
Not this is illustrative, not production code nor anywhere near a complete solution, it's pretty much just showing how you might use a Static for this. In your case you'd also need handle the situation that both NODX and OldNODX are actually Node objects, as otherwise
If NODX <> OldNodX
will error out
Something like:
Code: Select all
Static OldNODX as Node
Dim NODX As Node
Set NODX = TreeView1.HitTest(X, Y)
If NODX <> OldNodX then
OldNODX=NODX
' do stuff with NODX
If NODX <> OldNodX
will error out
-
- PlatinumLounger
- Posts: 4364
- Joined: 26 Apr 2010, 17:36
Re: idea to tooltip in treeview
Attached my test project.SpeakEasy wrote: ↑17 Sep 2022, 22:47>i need to check when the old value of nodx is changed resopect the new nodx...
Something like:
Not this is illustrative, not production code nor anywhere near a complete solution, it's pretty much just showing how you might use a Static for this. In your case you'd also need handle the situation that both NODX and OldNODX are actually Node objects, as otherwiseCode: Select all
Static OldNODX as Node Dim NODX As Node Set NODX = TreeView1.HitTest(X, Y) If NODX <> OldNodX then OldNODX=NODX ' do stuff with NODX
If NODX <> OldNodX
will error out
the balloon work only on the first node(2022) and second node(01-GENNAIO)!
You do not have the required permissions to view the files attached to this post.