auto-hiding checkboxes?

14 views
Skip to first unread message

Arioch The

unread,
Mar 23, 2017, 6:35:15 AM3/23/17
to Virtual Treeview
Imagine a tree, used to select some options from a dictionary (like postal ZIP-codes structured into yet-narrowing geographical structure).

The are two possibilities: that selecting a parent implicitly selects all its children, or nor. Are those elements nested sets or independent units.

Like ,if we select the "city X", are we implicitly selecting also all addresses like "city X, street Y" addresses and "city X, street Y, buildings Z" ones too?

If we do not, if Parents do not include Children, then we are back to that "mixed mode" check kind propagation: Parents check state is calculated as the "sum" of its children states. This bottom-up propagation AFAIR can be automatized by VTV options.

Yet if we do, if Parents include their children, then propagation direction reverses: when Parent check box is ticked - then all its children should have their checkboxes hidden or at least disabled. And equally, when Parent checkbox is cleared, then Children should regain their checkboxes. This hiding/unhiding (or disabling/enabling) should keep the "checked" state of children, so that user could quickly grand-check any parent he likes, then grand-uncheck it and keep the fine-grained checks of the children he tuned earlier.

In our legacy code this top-down propagation is managed by more or less copy-pasted event handlers in every form needing that, tweaked to deal with UserData nodes' payloads.
But perhaps I am missing something and this functionality (automatic hiding/disabling children checkboxes when parent is checked) is already integrated into newer VTV ?
Reply all
Reply to author
Forward
0 new messages