Is "Gui +Disabled" supposed to disable the keyboard?
Posted: 09 Feb 2014, 11:03
I'm using the "Gui +Disabled" command to prevent the user from interacting with the window while a Gui update is done after a change in a dropdown list. This update may last 2-5 seconds depending on the number of images to update. The "+disabled" option works only partly. Mouse clicks are blocked and make the Gui beep. But the keyboard is not blocked. The Up/Down keys are still active and the user can change the dropdown selection during the update. The dropdown list still has the focus.
Here is sample code:
The DropDownChanged command is not triggered while the Gui is disabled. But its content can be changed and I need to avoid this. I tried to disable the dropdown list itself but, then, the list loose the focus, preventing the user to select the next item in the list immediately after the Gui would be re-enabled using the Up or Down arrows.
Is "Gui +Disabled" supposed to prevent Gui interaction with the keyboard ?
Thanks for input on this.
Here is sample code:
Code: Select all
#SingleInstance force
Gui, Add, DropDownList, vList gDropDownChanged Sort, A|B|C|D|E
Gui, Add, Text, w200 vText, Choose an option in the dropdown
Gui, Show, w250 h100
return
DropDownChanged:
Gui, Submit, NoHide
Gui, +Disabled
GuiControl, , Text, Option selected: %List%. Updating the Gui...
Sleep, 2000 ; simulate the Gui doing some update
GuiControl, , Text, Gui updated
Gui, -Disabled
return
Is "Gui +Disabled" supposed to prevent Gui interaction with the keyboard ?
Thanks for input on this.