VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Treeview Checkbox (AUTO CHECK / UNCHECK, recursive for parents & childs of a node)

by Roberto Wolf (1 Submission)
Category: Libraries
Compatability: Visual Basic 5.0
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating: (3 Votes)

This very simple function will handle all Checkboxes (parents & childs) of a TreeView control.
If you click a child node it will check all parents of this node. Also, if you "uncheck" a child node when nomore nodes are checked on the same hierarchy, this code will auto uncheck all the parents.
Simple function. Recursive calls.
The code encapsulated in a separated .BAS.
Only add this .BAS in your project and enjoy.
If you have any doubts, please let me know.
Sorry by the horrible english...

[]'s
Roberto Wolf (Brasil/SP).
MCP+Site Building

Inputs
Only pass the treeview control and a node that you need to handle.
Side Effects
This code don't have any side effects and in other hands, CORRECT the Checkbox bug reported by Microsoft Corp. More information see in Microsoft Web site. Article ID: Q192188 (BUG: TreeView Problems with CheckBoxes).

Rate Treeview Checkbox (AUTO CHECK / UNCHECK, recursive for parents & childs of a node)

Download Treeview Checkbox (AUTO CHECK / UNCHECK, recursive for parents & childs of a node)

Download Treeview Checkbox (AUTO CHECK / UNCHECK, recursive for parents & childs of a node) (2 KB)

Treeview Checkbox (AUTO CHECK / UNCHECK, recursive for parents & childs of a node) Comments

No comments have been posted about Treeview Checkbox (AUTO CHECK / UNCHECK, recursive for parents & childs of a node). Why not be the first to post a comment about Treeview Checkbox (AUTO CHECK / UNCHECK, recursive for parents & childs of a node).

Post your comment

Subject:
Message:
0/1000 characters