sshrum 1 Posted June 6, 2005 From where I'm looking at this, it seems like it wouldn't be possible but then again I have been wrong on occassion. :"> Would it be possible to create dynamicaly create treeviewitems? The problem is defining the treeviewitem variable (that I can see). If someone has a snippet, it would do nicely. TIA Sean Shrum :: http://www.shrum.netAll my published AU3-based apps and utilities'Make it idiot-proof, and someone will make a better idiot' Share this post Link to post Share on other sites
Helge 3 Posted June 6, 2005 Use a For/Next-loop together with Assign() to create the items,and use a For/Next-loop together with Eval() to read the items.For $i = 1 To 10 Assign("item" & $i,GUICtrlCreateListViewItem("Item " & $i,$listview)) Next Share this post Link to post Share on other sites
sshrum 1 Posted June 6, 2005 (edited) Kewl...I've implemented the code but for some reason the treeview is not updating. Is there a refresh command? case $msg = $button_add $path_string = FileSelectFolder("Choose a folder to monitor.", "") $path_array = StringSplit($path_string, "\") $parent = "" For $i = 1 To $path_array[0] $parent = $parent & $path_array[$i] $parent = StringReplace($parent,":","") msgbox(0,"result",$parent) if $i = 1 then assign($parent,GUICtrlCreateListViewItem($path_array[$i] & ":",$treeview)) Else assign($parent,GUICtrlCreateListViewItem($path_array[$i],$parent)) EndIf Next Edited June 6, 2005 by sshrum Sean Shrum :: http://www.shrum.netAll my published AU3-based apps and utilities'Make it idiot-proof, and someone will make a better idiot' Share this post Link to post Share on other sites
Helge 3 Posted June 6, 2005 This might solve your problem..; The first doesn't work, but the two others do. GUICtrlCreateListView("",10,10,280,80); No text.. GUICtrlCreateListView(" ",10,10,280,80) GUICtrlCreateListView("|",10,10,280,80)Pure guessing. Share this post Link to post Share on other sites
sshrum 1 Posted June 6, 2005 I just noticed...your talking *listview*. I need *treeview* items... This works now... :"> Doh! Sean Shrum :: http://www.shrum.netAll my published AU3-based apps and utilities'Make it idiot-proof, and someone will make a better idiot' Share this post Link to post Share on other sites