Example:
Code: Select all
class MyClassName {
__New() {
this.myGui := Gui()
this.myButton := this.myGui.AddButton(, "Button")
this.myButton.OnEvent("Click", myButton_Click)
this.myGui.Show()
}
myMethod() {
; I want to be able to call this when myButton is clicked
}
}
myButton_Click(button, info) {
; I want to be able to call myMethod here
}
myClass := MyClassName()