dani Posted November 15, 2007 Share Posted November 15, 2007 OnEvent Mode works fine if you create TreeViewItems with the regular GUICtrlCreateTreeViewItem, simply because this function returns a Control ID - which is required by GUICtrlSetOnEvent(). However, TreeView functionality has been increased greatly by GUITreeView.au3 as included in the Beta. You can now add Items with _GUICtrlTreeView_AddChild, for example. However, it's not possible to use GUICtrlSetOnEvent on this function, since it returns an item handle. Is there any way to convert the handle to a control ID? Control ID to handle is done by simply calling ControlGetHandle. This Control ID as used by existing functions as opposed to Handles used by all Beta functions is driving me crazy. You can't use any "old" functions with handles, though you can use the "new" functions with control IDs since you can simply get the handle. What is up with this weird stuff :/ ? I want to use OnEvent Mode for checkboxes in a TreeView which is recursively filled. However, I can not use the regular GUICtrlCreateTreeViewItem cause it needs the control ID of the parent and all new nice functions like _GUICtrlTreeView_GetFirstChild etc return a handle...Anyways, it's effectively impossible to use the OnEvent Mode together with the new _GUICtrlTreeView_Add function, intended behaviour or am I (hopefully) missing something? Link to comment Share on other sites More sharing options...
dani Posted November 19, 2007 Author Share Posted November 19, 2007 (edited) I'm pretty sure it doesn't work. Anyway, I now simply use the standard GUICtrlCreateTreeViewItem in some For loops to create all my nodes. I'm still puzzled why Beta TreeView functions use handles (which can be obtained from controlIDs) and non-beta functions use controlIDs (which can not be obtained from handles). Edited November 19, 2007 by D4ni 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