Sign in to follow this  
Followers 0
laphlaw

Different menus with Treeview

2 posts in this topic

Hi,

I'm trying to create a GUI that has a tree view that has different menus, and when clicked on refreshes the GUI to display that menu's labels, buttons, etc. I searched in the help file, but I'm having difficulty understanding it.

The help docs show this function:

Func GUIChangeItems($hidestart,$hideend,$showstart,$showend)
    Local $idx,$hidestart,$hideend,$showstart,$showend
    
    For $idx = $hidestart To $hideend
        GUICtrlSetState ($idx,$GUI_HIDE)
    Next
    For $idx = $showstart To $showend
        GUICtrlSetState ($idx,$GUI_SHOW)
    Next    
EndFunc

First of all, I don't understand how the switching really takes place. Why do you need to pass 4 variables to the function? Wouldn't you just need to show the desired window?

So basically, I just need the best way to have a list of 25 or so items in the tree, and have a different "GUI" for each. I'm stumped.

Share this post


Link to post
Share on other sites



Hi,

I'm trying to create a GUI that has a tree view that has different menus, and when clicked on refreshes the GUI to display that menu's labels, buttons, etc. I searched in the help file, but I'm having difficulty understanding it.

The help docs show this function:

Func GUIChangeItems($hidestart,$hideend,$showstart,$showend)
    Local $idx,$hidestart,$hideend,$showstart,$showend
    
    For $idx = $hidestart To $hideend
        GUICtrlSetState ($idx,$GUI_HIDE)
    Next
    For $idx = $showstart To $showend
        GUICtrlSetState ($idx,$GUI_SHOW)
    Next    
EndFunc

First of all, I don't understand how the switching really takes place. Why do you need to pass 4 variables to the function? Wouldn't you just need to show the desired window?

So basically, I just need the best way to have a list of 25 or so items in the tree, and have a different "GUI" for each. I'm stumped.

the first 2 vars are for the controls to hide, the next 2 are for the controls to show

being the controls are created one after the other they should be number in order

so if you select computer from the example it hides for example controls 11 and 12 and shows control 13


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