Jump to content

TreeView Checkboxes help


Recommended Posts

im having trouble setting checkboxes in the treeview control.

heres my code,

For $i = 1 To $cities[0]
    $finditem = _GUICtrlTreeView_FindItem($hTreeView, $cities[$i])
    If $finditem Then
        _GUICtrlTreeView_SelectItem($hTreeView, $finditem)
        _GUICtrlTreeView_SetChecked($hTreeView, $finditem, True)
    EndIf
Next

now that works for setting each check box that i need set, but it takes an awful long time if their are alot of items in the $cities array. my guess is _GUICtrlTreeView_SelectItem is making it take so long. So my question is, is there a way i can use _GUICtrlTreeView_SetChecked without having to call SelectItem on the item i want checked first? i think my script would run alot faster if i could just check the items i want checked without having to select them beforehand. I've tried a couple ways, but none have worked out.

Any help would be much appreciated.

Edited by hounder
Link to comment
Share on other sites

Another way to select, if this is your question:

If you want to select another item in a TreeView then you can use $GUI_FOCUS - the parent TreeView gets the window focus and the specified item is marked as selected.

When the words fail... music speaks.

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
 Share

  • Recently Browsing   0 members

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