Jump to content

Connecting event functions to gui controls


Recommended Posts

Hi all,

This code is from an IronPython project. 

self._button1.Click += self.Button1_Click
self._button1.MouseHover += self.Button1_MouseHover

def Button1_Click(self, sender, e):
    System.Windows.Forms.MessageBox.Show("Hi you clicked me ?")

def Button1_MouseHover(self, sender, e):
    sender.Text = "Mouse Entered"

How easy to connect any event function to any control. I know AutoIt can do this with GUICtrlSetOnEvent function.  But this function only takes control ID and function name as parameters. We can't tell AutoIt to act on which event. And for some events, we needs to use GUIRegisterMsg in order to respond some specific messages. My question is ---  Is it possible to do this IronPython way in AutoIt ?


My Contributions

Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language.

UDF Link Viewer   --- A tool to visit the links of some most important UDFs 

 Includer_2  ----- A tool to type the #include statement automatically 

 Digits To Date  ----- date from 3 integer values

PrintList ----- prints arrays into console for testing.

 Alert  ------ An alternative for MsgBox 

 MousePosition ------- A simple tooltip display of mouse position

GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function

Access_UDF  -------- An UDF for working with access database files. (.*accdb only)


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

  • Create New...