This Question is Answered

1 "correct" answer available (5 pts) 14 "helpful" answers available (3 pts)
1 Replies Last post: Jul 29, 2008 9:20 PM by carl

Expend and Collapse status of TreeNode

Jul 29, 2008 6:09 PM

Click to view CurlFans's profile Level 1 CurlFans 3 posts since
Jul 7, 2008

Hi,I have a problem descripted as follows:

In screen ,I create a tree by TreeControl,and there is a CommandButton .By pressing this button ,a new node is added to the tree.

At this moment, the tree should refresh the data.

So my question is, whether the tree can remember the Expend and Collapse status of every node before adding the new node .If could, how to make it true?


Thank you!

Click to view carl's profile Curl carl 83 posts since
Oct 17, 2007
1. Re: Expend and Collapse status of TreeNode Jul 29, 2008 9:20 PM
Sure. Every TreeItem has the expanded? property, and TreeControl has the expanded-nodes property.

And the TreeControl should refresh automatically when you add a node. Adding a node shouldn't affect the toggling state, so it should be the same before or after.