Jump to content

GUICtrlSetOnEvent ControlID = -1


ninja
 Share

Recommended Posts

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

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...