Jump to content

GUICtrlSetOnEvent and InputBox


 Share

Recommended Posts

Can you configure an InputBox with a GUICtrlSetOnEvent?

The following code shows that nothing happens when I click on the InputBox.

I don't know if this is deliberate or if I have done something wrong here.

; Script generated by AutoBuilder 0.5 Prototype
#include <GuiConstants.au3>
Opt("GUIOnEventMode", 1)
GuiCreate("MyGUI", 173, 163,(@DesktopWidth-173)/2, (@DesktopHeight-163)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)
GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked")
$Button_1 = GuiCtrlCreateButton("Button1", 30, 20, 110, 40)
GUICtrlSetOnEvent($Button_1,"Button1_clicked")
$Label_2 = GuiCtrlCreateLabel("Label2", 30, 70, 110, 30)
GUICtrlSetOnEvent($Label_2,"Label2_clicked")
$Input_3 = GuiCtrlCreateInput("Input3", 30, 110, 110, 30)
GUICtrlSetOnEvent($Input_3,"Input3_clicked")
GuiSetState()
While 1
  Sleep(1000) ; Idle around
WEnd
Func Input3_clicked()
  MsgBox(0, "GUI Event", "Input3_clicked")
EndFunc
Func Label2_clicked()
  MsgBox(0, "GUI Event", "Label2_clicked")
EndFunc
Func Button1_clicked()
  MsgBox(0, "GUI Event", "Button1_clicked")
EndFunc
Func CLOSEClicked()
  MsgBox(0, "GUI Event", "You clicked CLOSE! Exiting...")
  Exit
EndFunc

Any thoughts.

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