ZoScr Posted November 15, 2006 Share Posted November 15, 2006 (edited) I create a GUI (with WS_EX_ACCEPTFILES), create an Input control (and set state to GUI_DROPACCEPTED), and assign the GUI_EVENT_DROPPED event to a function. It works perfectly. (When I drag a file onto the Input control, the control is populated, and then my Dropped function is called.) But if I change the Input control to an Edit control, the GUI_EVENT_DROPPED function is never called. (I can still drop a file on the Edit control, and it's populated, but the function that should then get called never is.) #include <GUIConstants.au3> Opt("GUIOnEventMode", 1) GUICreate("Test", 320,260, @DesktopWidth/2-160, @DesktopHeight/2-45, $WS_OVERLAPPEDWINDOW, $WS_EX_ACCEPTFILES) $filesCtrlID = GUICtrlCreateInput( "", 10, 5, 300, 200) ;If I change the above to GUICtrlCreateEdit, the FileWasDropped function is never called GUICtrlSetState($filesCtrlID, $GUI_DROPACCEPTED) GUISetOnEvent($GUI_EVENT_DROPPED, "FileWasDropped") GUISetState (@SW_SHOW) While 1 Sleep(1000) Wend Func FileWasDropped() ;Only gets called for Input control, not for Edit control msgbox(4096, "dropped", "Dropped is called!") EndFunc Any ideas? Many thanks for any help! (This is with AutoIt 3.2.0.1 on Windows XP SP2.) Edited November 15, 2006 by ZoScr Link to comment Share on other sites More sharing options...
jpm Posted November 16, 2006 Share Posted November 16, 2006 I cannot remember why it was the only control type that cannot have an drop event. But that the way it was implemented long time ago (beta 3.1.1.99). :"> Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted November 16, 2006 Share Posted November 16, 2006 I cannot remember why it was the only control type that cannot have an drop event.But that the way it was implemented long time ago (beta 3.1.1.99). :">maybe you could make it compatible with every guictrlcreate command Link to comment Share on other sites More sharing options...
jpm Posted November 16, 2006 Share Posted November 16, 2006 maybe you could make it compatible with every guictrlcreate command I need to remember why I exclude the edit control only :"> :"> Link to comment Share on other sites More sharing options...
ZoScr Posted November 19, 2006 Author Share Posted November 19, 2006 Thanks for the answer. In the interim, perhaps it could be added to the relevant pages of the user manual that this function doesn't work with this kind of control? Link to comment Share on other sites More sharing options...
jpm Posted November 20, 2006 Share Posted November 20, 2006 Thanks for the answer. In the interim, perhaps it could be added to the relevant pages of the user manual that this function doesn't work with this kind of control?In fact I suppress the control to allow edit control to work in 3.2.1.13.We will see if It was on purpose 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