N W Posted December 20, 2005 Posted December 20, 2005 I'm trying to set up an edit control that allows me to drag multiple files into it. (Then I will process those files in a later step.) I can type in multiple lines to this control, but every time I drag a file in, it replaces the contents, rather than appending. Additionally (relatedly?), when I drag multiple files into it at once, only one appears. I've browsed around the forums a lot and haven't seen anything that answers this. #include <GUIConstants.au3> GUICreate("Aaaaargh!", 830, 800, -1 , -1 , -1, 0x00000018); WS_EX_ACCEPTFILES $CANCELbtn = GUICtrlCreateButton ("Cancel" , 750, 5, 60, 20) $OKbtn = GUICtrlCreateButton ("OK" , 750, 35, 60, 20) $mylist = GUICtrlCreateEdit ("Add Files here!",10,70,200,300, BitOr($GUI_SS_DEFAULT_EDIT, $ES_MULTILINE) ) GUICtrlSetState(-1,$GUI_ACCEPTFILES) GUISetState () $msg = 0 While $msg <> $GUI_EVENT_CLOSE $msg = GUIGetMsg() Select Case $msg = $CANCELbtn exitloop Case $msg = $OKbtn MsgBox(4096,"result",GUICtrlRead($mylist)) EndSelect Wend exit Thanks a lot! --NW
Ragamuffin Posted December 20, 2005 Posted December 20, 2005 Try GUICtrlCreateList I dont know how to put stuff in there. But it may -hlep- you
N W Posted December 21, 2005 Author Posted December 21, 2005 Creating a list instead of an edit would be fine, but I can't get the file into there, either.
Valuater Posted December 21, 2005 Posted December 21, 2005 maybe this #include <GUIConstants.au3> GUICreate("Aaaaargh!", 630, 600, -1 , -1 , -1, $WS_EX_ACCEPTFILES ); 0x00000018); WS_EX_ACCEPTFILES $CANCELbtn = GUICtrlCreateButton ("Cancel" , 750, 5, 60, 20) $OKbtn = GUICtrlCreateButton ("OK" , 750, 35, 60, 20) $mylist = GUICtrlCreateEdit ("Files will be Added here!",10,70,200,300);, BitOr($GUI_SS_DEFAULT_EDIT, $ES_MULTILINE) ) $myinput = GUICtrlCreateInput("Drop File here", 10, 372, 160, 20) GUICtrlSetState(-1,$GUI_ACCEPTFILES) $mybtn = GUICtrlCreateButton("&Insert", 170, 372, 40, 20) GUISetState () $msg = 0 While $msg <> $GUI_EVENT_CLOSE $msg = GUIGetMsg() Select Case $msg = $mybtn GUICtrlSetData($mylist, (GUICtrlRead($myinput)) & @CRLF, 1) Case $msg = $CANCELbtn exitloop Case $msg = $OKbtn MsgBox(4096,"result",GUICtrlRead($mylist)) EndSelect Wend exit 8)
N W Posted January 11, 2006 Author Posted January 11, 2006 Hmmm. A step in the right direction, I suppose--thanks! But I want to be able to drag multiple files at once (i.e., select several at once in Windows Explorer, and drag them as a group). Still can't figure that out. --N W
Thatsgreat2345 Posted January 11, 2006 Posted January 11, 2006 why cant u just make it so if u drag to the big edit then it inserts them ?
HardCopy Posted January 11, 2006 Posted January 11, 2006 (edited) why cant u just make it so if u drag to the big edit then it inserts them ? #include <GUIConstants.au3> GUICreate("Aaaaargh!", 630, 600, -1 , -1 , -1, $WS_EX_ACCEPTFILES ); 0x00000018); WS_EX_ACCEPTFILES $CANCELbtn = GUICtrlCreateButton ("Cancel" , 750, 5, 60, 20) $OKbtn = GUICtrlCreateButton ("OK" , 750, 35, 60, 20) $mylist = GUICtrlCreateEdit ("Files will be Added here!",10,70,200,300);, BitOr($GUI_SS_DEFAULT_EDIT, $ES_MULTILINE) ) GUICtrlSetState(-1,$GUI_DROPACCEPTED) GUISetState () $msg = 0 While $msg <> $GUI_EVENT_CLOSE $msg = GUIGetMsg() Select Case $msg = $CANCELbtn exitloop ; Case $msg = $OKbtn ; MsgBox(4096,"result",GUICtrlRead($mylist)) EndSelect Wend exit Modifed Valuators Code / Requires Latest Beta TO work Hardcopy Edit : Couldnt Spell my Name Edited January 11, 2006 by HardCopy Contributions: UDF _DateYearFirstChildren are like Farts, you can just about stand your own.Why am I not a Vegetarian?...Well...my ancestors didn't fight & evolve to the Top of the food chain for me to survive on Salad
Thatsgreat2345 Posted January 11, 2006 Posted January 11, 2006 (edited) hardcopy ur thing only let it add 1 file i would edit it but i have to go Edited January 11, 2006 by thatsgreat2345
HardCopy Posted January 11, 2006 Posted January 11, 2006 (edited) hardcopy ur thing only let it add 1 filei would edit it but i have to go Pardon? Works fine for meSelect multiple files in explorer, Drag to EditControl, Drop all files show.Perhaps it because u in a rush to go!! HardCopy Edited January 11, 2006 by HardCopy Contributions: UDF _DateYearFirstChildren are like Farts, you can just about stand your own.Why am I not a Vegetarian?...Well...my ancestors didn't fight & evolve to the Top of the food chain for me to survive on Salad
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