Zedna Posted November 26, 2005 Share Posted November 26, 2005 In include file GuiTreeView.au3 is Func _TreeViewGetItemText().On the same basis I made Func _TreeViewGetItemState()It's useful especially for treeviews with checkboxes to get the state of each item (checked/unchecked but also other states)as shown in my little example of using it.In my example in function Show I intentionally usedTVM_GETNEXTITEM & TVGN_xxx to demonstrate common working with treeviews.Developers could add this UDF to include file GuiTreeView.au3so all users can use benefit from it.And this example script also could be added in AutoIt HelpFileas example for UDF _TreeViewGetItemText() and _TreeViewGetItemState()_TreeViewGetItemState.au3treeview_item_state_example.au3 Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Holger Posted November 26, 2005 Share Posted November 26, 2005 In include file GuiTreeView.au3 is Func _TreeViewGetItemText(). On the same basis I made Func _TreeViewGetItemState() It's useful especially for treeviews with checkboxes to get the state of each item (checked/unchecked but also other states) as shown in my little example of using it. In my example in function Show I intentionally used TVM_GETNEXTITEM & TVGN_xxx to demonstrate common working with treeviews. Developers could add this UDF to include file GuiTreeView.au3 so all users can use benefit from it. And this example script also could be added in AutoIt HelpFile as example for UDF _TreeViewGetItemText() and _TreeViewGetItemState() _TreeViewGetItemState.au3treeview_item_state_example.au3 Hi Zedna you know that you can get the state by using "GUICtrlRead(itemID)" don't you? So you can check the state for instance with using: If BitAnd(GUICtrlRead($item1), $GUI_CHECKED)... If BitAnd(GUICtrlRead($item1), $GUI_UNCHECKED)... If BitAnd(GUICtrlRead($item1), $GUI_FOCUS)...; item selected If BitAnd(GUICtrlRead($item1), $GUI_EXPAND)...; item expanded If BitAnd(GUICtrlRead($item1), $GUI_DEFBUTTON)...; item is bold Just for your info I think I have to 'extend' the helpfile a little bit So long... Holger Old project:GUI/Tray menu with icons and colors Other old stuff:IconFileScanner, TriState/ThreeState GUI TreeView, GUI ContextMenu created out of a TreeView Link to comment Share on other sites More sharing options...
Zedna Posted November 26, 2005 Author Share Posted November 26, 2005 ...Hi Holger Of course I know about BitAnd(GUICtrlRead($item1), $GUI_CHECKED)but it can't be used in case when I haven't control_id for treeview items and get items from TVM_GETNEXTITEM as it is in my example.If there is some way to get control_id from handle (HTREEITEM) of item please tell me... Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Zedna Posted April 22, 2006 Author Share Posted April 22, 2006 @HolgerFive months later in version 3.1.1.116 you added _GUICtrlTreeViewGetState() which is the same as my proposed UDF _TreeViewGetItemState() from here. So you can see that also other peoples and not only developers have sometimes good ideas Keep your good work on AutoIt. Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
rbhkamal Posted July 19, 2006 Share Posted July 19, 2006 @ZednaDllStructDelete() does not exits in Autoit Beta anymore.I'm having problems with these scriptsRegards,RK "When the power of love overcomes the love of power, the world will know peace"-Jimi Hendrix Link to comment Share on other sites More sharing options...
Zedna Posted July 30, 2006 Author Share Posted July 30, 2006 @ZednaDllStructDelete() does not exits in Autoit Beta anymore.I'm having problems with these scriptsRegards,RKInstead of DllStructDelete($struct_name) use $struct_name = 0 Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
rbhkamal Posted July 31, 2006 Share Posted July 31, 2006 Instead of DllStructDelete($struct_name) use $struct_name = 0Thanks,RK "When the power of love overcomes the love of power, the world will know peace"-Jimi Hendrix 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