sshrum Posted June 6, 2005 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.net All my published AU3-based apps and utilities 'Make it idiot-proof, and someone will make a better idiot'
Helge Posted June 6, 2005 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
sshrum Posted June 6, 2005 Author 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.net All my published AU3-based apps and utilities 'Make it idiot-proof, and someone will make a better idiot'
Helge Posted June 6, 2005 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.
sshrum Posted June 6, 2005 Author Posted June 6, 2005 I just noticed...your talking *listview*. I need *treeview* items... This works now... :"> Doh! Sean Shrum :: http://www.shrum.net All my published AU3-based apps and utilities 'Make it idiot-proof, and someone will make a better idiot'
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