hounder Posted June 27, 2011 Share Posted June 27, 2011 (edited) 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 June 27, 2011 by hounder Link to comment Share on other sites More sharing options...
Andreik Posted June 27, 2011 Share Posted June 27, 2011 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 More sharing options...
AdmiralAlkex Posted June 27, 2011 Share Posted June 27, 2011 What is the SelectItem supposed to do? I think it's pointless. Comment/delete it. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
Zedna Posted June 27, 2011 Share Posted June 27, 2011 Look at these my posts and principles of possible UDFs speed optimizations: I looked quickly at _GUICtrlTreeView_FindItem() _GUICtrlTreeView_SelectItem() _GUICtrlTreeView_SetChecked() and it can be optimized that way too. Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now