2

Is there a way to show subnode if the parent node is hidden in the Virtual String Tree ?

I have some tasks in the tree structure and I wish to display only tasks which belongs to the current user as the list, but from all levels. What I've done is the function to display a list, which hides tree buttons, tree lines, sets the fixed indent and enable toShowHiddenNodes option. Then in this function I iterate through the whole tree (all levels) and hide nodes which doesn't belong to the current user IsVisible[Node] := False and show those which belongs him IsVisible[Node] := True, but the subnodes which should be displayed are invisible when their parent is hidden.

VT.TreeOptions.PaintOptions
- toShowButtons
- toShowTreeLines
+ toFixedIndent
+ toShowHiddenNodes

alt text

1 Answers1

4

No. Subnodes of invisible nodes are invisible, too, unless you move them to a visible parent, or to the top level (nil parent).

Ondrej Kelle
  • 36,941
  • 2
  • 65
  • 128
  • +1 and accept. Thanx for the answer. I've checked the code and it seems that the whole painting concept doesn't allow this. I've tried to omit VisiblePath conditions from SetVisible method, but then I get the strange results at painting. This would be very complicated to modify, so I'll use another tree to display the list. –  Jan 12 '11 at 15:41