Opened 13 years ago

Last modified 13 years ago

#1972 closed Bug

Strange behavior with ControlClick and deactivated button on AutoIt GUI — at Initial Version

Reported by: Tlem Owned by:
Milestone: Component: AutoIt
Version: 3.3.6.1 Severity: None
Keywords: Cc:

Description

I don't know if it can be considered for a bug, but if you use a ControlClick on an deactivated button in an AutoIt GUI, then this button react all the same !!!

Take a look on this code :{{{
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

Global $Form1 = GUICreate("MyGUI", 196, 148, -1, -1)
Global $Button1 = GUICtrlCreateButton("Button1", 56, 32, 75, 25)
Global $Button2 = GUICtrlCreateButton("Button2", 56, 88, 75, 25)
GUICtrlSetState(-1, $GUI_DISABLE)
GUISetState(@SW_SHOW)

While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit

Case $Button1
MsgBox(0, 'Info', 'You have clicked the button1. Now a ControlClic will be send to desativated button2')
ControlClick("MyGUI", "Button2", "[CLASS:Button; INSTANCE:2]")

Case $Button2
MsgBox(0, 'Info', 'Button2 have been clicked !!!')

EndSwitch
WEnd
}}}

Maybe it's the same think for all the control with this style in AutoIt!

Change History (0)

Note: See TracTickets for help on using tickets.