Sign in to follow this  
Followers 0
Samuel

TreeView Collapse Question

6 posts in this topic

I know you can Expand a Tree but how do you Collapse the Tree?

I have buttons that are expanding my TreeView but can I have a button to Collapse a certain part of the tree or reseting the entire Tree?

I use GuiCtrlSetState($menu, $GUI_EXPAND) to Expand.

Thanks

Share this post


Link to post
Share on other sites



You can also use _GUICtrlTreeViewExpand($i_treeview[, $i_expand = 1[, $h_itemID = 0]])

where $i_expand = 1 expand and $i_expand = 0 collapses


AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line

Share this post


Link to post
Share on other sites

Is there a way to collapses the entire tree with one command?

I am trying to make a button that collapses all the ones I have opened. Instead of just collapsing the main tree but all the ones under it are still expanded.

Share this post


Link to post
Share on other sites

Nevermind I figured it out! Thanks a lot.

Share this post


Link to post
Share on other sites

Nevermind I figured it out! Thanks a lot.

If you figured it out why not provide a sample? Others might hunt the forum for the same question. Walk all sub nodes and collapse each and everyone is one solution. Is there a faster?

Share this post


Link to post
Share on other sites

If you figured it out why not provide a sample? Others might hunt the forum for the same question. Walk all sub nodes and collapse each and everyone is one solution. Is there a faster?

it's in the example:

_GUICtrlTreeViewExpand($treeview, 0)

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0