Sign in to follow this  
Followers 0
OutThisLife

Really confusing, Combo and Tree..

2 posts in this topic

#1 ·  Posted (edited)

Tay well title doesn't say much because I don't really know how to put it but this is what I want and I'm pretty damn lost:

Say you had a combo, the things in it were "Group01|Group02" and if you were to click on "Group01" it would open up a child-window with a treemenu and the treemenu of Group01 would be expanded. I'm just really confused on how to do this.

Would it be something like:

GUICtrlCreateCombo("Group List",15,40,100,25)
$List = GUICtrlSetData(-1,"Group01|Group02")

if $list = "Group01" then
GUICreate()..
...

Then I'd have in that GUI the tree and whatnot, how would I expand the Group01 though?

Or am I not even in the ballpark?

Thanks.

Edited by OutThisLife

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

you want the combo to be expanded?

#include<guiconstants.au3>
$groups = "Group01|Group02"
$groli = "Group List"
GUICreate("egal", 300, 300)
$combo = GUICtrlCreateCombo($groli,15,40,100,25)
$list = GUICtrlSetData(-1,$groups)
$but = GUICtrlCreateButton("but", 80, 80)
GUISetState()

while 1
$msg = GUIGetMsg()
if $msg = $GUI_EVENT_CLOSE then Exit
if $msg = $but Then
    if guictrlread($list) = "Group01" then
        $limit = 1; limit for groups
        $info = StringSplit ($groups, "|"); splitting groups
        GUICtrlDelete($combo); deleting combo
        $combo = GUICtrlCreateCombo($groli,15,40,100,25); creating new combo
        guictrlsetdata($combo, $groli)
        for $i = 1 to $limit step 1
            guictrlsetdata($combo, $info[$i])
        Next
        guictrlsetdata($combo, "the|new|stuff")
        for $i = $limit + 1 to $info[0] step 1
            guictrlsetdata($combo, $info[$i])
        Next
    EndIf
EndIf
WEnd

i'm not sure if this is what you need, but it was fun to write it B)

does "the new stuff" right behind the group01 in the combobox

Edited by Nuffilein805

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