zeevid Posted September 28, 2006 Share Posted September 28, 2006 I have a program that loads a treeview with data from a database. As the data is loaded, the parent items are expanded. Once all of the items have been loaded into the treeview I want to use code to automatically select the first item under the first parent in the treeview. Can this be done? Link to comment Share on other sites More sharing options...
FuryCell Posted September 29, 2006 Share Posted September 29, 2006 (edited) Look up _GUICtrlTreeViewSetState() in the helpfile. It should be useful for what you asked. Edited September 29, 2006 by SolidSnake HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code. Link to comment Share on other sites More sharing options...
zeevid Posted October 3, 2006 Author Share Posted October 3, 2006 Look up _GUICtrlTreeViewSetState() in the helpfile. It should be useful for what you asked.Thank you for the suggestion and you are right, the _GUICtrlTreeViewSetState() does allow me to select an item in the treeview.My next question is, how do I find the first item in the view? Since the tree is loaded from a database based on the user currently logged on, I do not know what the text of the item will be. I need some way to identify the first item in the tree. Can this be done?Thank you. Link to comment Share on other sites More sharing options...
Zedna Posted October 3, 2006 Share Posted October 3, 2006 My next question is, how do I find the first item in the view? Since the tree is loaded from a database based on the user currently logged on, I do not know what the text of the item will be. I need some way to identify the first item in the tree. Can this be done?Thank you.Look at my little treeview example and search at this forum ... Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
zeevid Posted October 3, 2006 Author Share Posted October 3, 2006 Look at my little treeview example and search at this forum ... Works like a charm. Thanks! Link to comment Share on other sites More sharing options...
martin Posted October 7, 2006 Share Posted October 7, 2006 Works like a charm. Thanks!How did you get it to work?I get an error because GuiTreeView.au3 does not contain the function _TreeViewGetItemText().I was using 3.2.1.5 and have updated to 3.2.1.7 but same problem. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. 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