check if i click on minus or plus sign in treeview
-
- PlatinumLounger
- Posts: 4470
- Joined: 26 Apr 2010, 17:36
check if i click on minus or plus sign in treeview
How to check when i click on minus or plus sign in treeview?
You do not have the required permissions to view the files attached to this post.
-
- 5StarLounger
- Posts: 607
- Joined: 27 Jun 2021, 10:46
Re: check if i click on minus or plus sign in treeview
Well, when you click a +, then that branch of the tree expands, and when you cliock on a minus, it collapses.
Perhaps the Treeview control has events that match this behaviour ...
Perhaps the Treeview control has events that match this behaviour ...
-
- PlatinumLounger
- Posts: 4470
- Joined: 26 Apr 2010, 17:36
-
- Administrator
- Posts: 79287
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: check if i click on minus or plus sign in treeview
Code: Select all
Private Sub TreeView1_Collapse(ByVal Node As MSComctlLib.Node)
Debug.Print "-"
End Sub
Private Sub TreeView1_Expand(ByVal Node As MSComctlLib.Node)
Debug.Print "+"
End Sub
Best wishes,
Hans
Hans
-
- PlatinumLounger
- Posts: 4470
- Joined: 26 Apr 2010, 17:36
Re: check if i click on minus or plus sign in treeview
super!HansV wrote: ↑28 Jun 2024, 16:36Code: Select all
Private Sub TreeView1_Collapse(ByVal Node As MSComctlLib.Node) Debug.Print "-" End Sub Private Sub TreeView1_Expand(ByVal Node As MSComctlLib.Node) Debug.Print "+" End Sub
tks bro