name15 Posted November 25, 2009 Share Posted November 25, 2009 how to add item to an other item by using _GUICtrlTreeView_GetTree() Link to comment Share on other sites More sharing options...
PsaltyDS Posted November 25, 2009 Share Posted November 25, 2009 how to add item to an other item by using _GUICtrlTreeView_GetTree()How about _GUICtrlTreeView_AddChild() instead? And what made you think _GUICtrlTreeView_GetTree() had anything to do with adding any items anywhere? Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
name15 Posted November 26, 2009 Author Share Posted November 26, 2009 you right but can add item by his location not by name as i0|i1|i2|i3|i4 (i4 a item to add new item) Link to comment Share on other sites More sharing options...
Info Posted November 26, 2009 Share Posted November 26, 2009 #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <TreeViewConstants.au3> #include <WindowsConstants.au3> #include <GuiTreeView.au3> Global $i1 = 1, $i2 = 1 $Form2 = GUICreate("Form1", 274, 298, -1, -1) $TreeView1 = GUICtrlCreateTreeView(0, 0, 185, 297) $Button1 = GUICtrlCreateButton("add item", 192, 8, 75, 25, $WS_GROUP) $Button2 = GUICtrlCreateButton("add child", 192, 40, 75, 25, $WS_GROUP) GUISetState(@SW_SHOW) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $Button1 _GUICtrlTreeView_BeginUpdate($TreeView1);begin update _GUICtrlTreeView_Add($TreeView1, 0, "Item" & $i1) _GUICtrlTreeView_EndUpdate($TreeView1);end update $i1 += 1 Case $Button2 _GUICtrlTreeView_BeginUpdate($TreeView1);begin update _GUICtrlTreeView_AddChild($TreeView1, _GUICtrlTreeView_GetFirstItem($TreeView1), "Child" & $i2) $i2 += 1 _GUICtrlTreeView_EndUpdate($TreeView1);end update EndSwitch WEnd Link to comment Share on other sites More sharing options...
name15 Posted November 26, 2009 Author Share Posted November 26, 2009 thank you i am trying to make file explorer when user but link in address the tree view will add correct new item to tree with out selected how can do that Link to comment Share on other sites More sharing options...
name15 Posted November 27, 2009 Author Share Posted November 27, 2009 any idea Link to comment Share on other sites More sharing options...
PsaltyDS Posted November 29, 2009 Share Posted November 29, 2009 thank you i am trying to make file explorer when user but link in address the tree view will add correct new item to tree with out selected how can do thatThat is not very clear English, but you should explain how close you are to what you want.Post a short demo script that comes as close as you can to this, and then explain what you want to work differently in that code. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law 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