ninja Posted January 24, 2007 Share Posted January 24, 2007 I just made a form with Koda and was reviewing the code. I can not understand one thing. In my form I created an input box. My script is using OnEventMode but I dont understand how the event are being assigned The Koda Generate code, which seems to work $txtServer = GUICtrlCreateInput("", 96, 120, 345, 24) GUICtrlSetOnEvent(-1, "txtServerChange") the autoit help file indicates the first parameter is a controlID GUICtrlSetOnEvent ( controlID, "function" ) So what I dont understand is how the (-1) Control Id attached to the correct control? It seems all the Koda created controls call GUICtrlSetOnEvent with -1 Also it is possible to use multiple event on a single control, for example on a button can I capture the MouseOver Event as well as the Clicked Event? Can someone explain how this is working or if -1 is a special default value? Thanks in Advance Link to comment Share on other sites More sharing options...
Zedna Posted January 24, 2007 Share Posted January 24, 2007 (edited) - Control ID -1 is for last control- for more events see GUIRegisterMsg() Edited January 24, 2007 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
ninja Posted January 24, 2007 Author Share Posted January 24, 2007 - Control ID -1 is for last control- for more events see GUIRegisterMsg()ZednaThanks for the quick reply, that code makes sense now. 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