VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

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

Roberto Wolf  (1 Submission)   Libraries   Visual Basic 5.0   Beginner   Wed 3rd February 2021

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) (4(4 Vote))

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

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

No comments yet — be the first to post one!

Post a Comment

0/1000 characters