Jump to content

Drag/drop treeview w/ checkboxes


sshrum
 Share

Recommended Posts

I'm looking for some starter code on dealing with a GUI with a treeview control that would allow for drag and drop of folders and files to generate a single level list of entries

_

|_| c:\my tunes\trance

_

|_| c:\my playlist\Sean's Favs.m3u

etc. etc.

#include <GuiConstants.au3>
GuiCreate("MyGUI", 452, 316,(@DesktopWidth-452)/2, (@DesktopHeight-316)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS + $WS_EX_ACCEPTFILES)
$treeview = GuiCtrlCreateTreeview(10, 40, 430, 210, Bitor($TVS_CHECKBOXES,$TVS_FULLROWSELECT,$TVS_TRACKSELECT))
GUICtrlSetState($treeview,$GUI_ACCEPTFILES)
GuiSetState()
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case Else
    ;;;
    EndSelect
WEnd
Exit

Pretty straightforward. I got the treeview down but I could never get the drag/drop to work.

I want to construct a dialog that would allow the user to add (and remove) entries to the treeview. The checkboxes would allow the user to specify which of the entries my script would process.

Addendum: I got drag and drop to work with edit so I know I'm coding this right...does the treeview even support drag/drop? I was under the impression that it did.

TIA

Edited 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'

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...