Saving expansion status of Tree Control 
Author Message
 Saving expansion status of Tree Control

Hi,

I'm using tree control in one of my dialog boxes. I want to save the
expansion status of the tree control, so that when the user invokes the same
dialog again the tree is shown as it was when the dialog was invoked last
time. That is, the branches which were expanded/collapsed at the time dialog
was closed last time, should appear expanded/collapsed next time the dialog
is invoked. Also, the item which appeared selected last time should again
appear selected next time.

Please tell me some method to do it. I've searched the MSDN for relevant
article but couldn't find anything in this regard.

Thanks,
Dev...



Sun, 01 Dec 2002 03:00:00 GMT  
 Saving expansion status of Tree Control
you have to implement this behavior on your own. it's rather easy - you just
remember nodes being expanded (but not HTREEITEM), and expand that nodes
during dialog initialization.


Quote:
> Hi,

> I'm using tree control in one of my dialog boxes. I want to save the
> expansion status of the tree control, so that when the user invokes the
same
> dialog again the tree is shown as it was when the dialog was invoked last
> time. That is, the branches which were expanded/collapsed at the time
dialog
> was closed last time, should appear expanded/collapsed next time the
dialog
> is invoked. Also, the item which appeared selected last time should again
> appear selected next time.

> Please tell me some method to do it. I've searched the MSDN for relevant
> article but couldn't find anything in this regard.

> Thanks,
> Dev...



Sun, 01 Dec 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Saving a tree control with a document

2. Save a NOT B-tree (but a tree) to a file

3. ResourceView Tree Expansion

4. Avoid tree expansion on double click

5. Basics of Tree Control and Tree view control

6. tree builder not as a tree control

7. saving status of collapsible comments

8. How do I control inline expansion of templates?

9. How do I control inline expansion of templates?

10. Save and Load Toolbar Status : size of toolbar

11. progress control to a status bar control

12. Progress control (or any control) on the status bar

 

 
Powered by phpBB® Forum Software