Jump to content

Really confusing, Combo and Tree..

Recommended Posts

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

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?


Edited by OutThisLife
Link to comment
Share on other sites

you want the combo to be expanded?

$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)

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])
        guictrlsetdata($combo, "the|new|stuff")
        for $i = $limit + 1 to $info[0] step 1
            guictrlsetdata($combo, $info[$i])

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
Link to comment
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

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...