Modify

Opened 15 years ago

Closed 14 years ago

#1972 closed Bug (No Bug)

Strange behavior with ControlClick and deactivated button on AutoIt GUI

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

Description (last modified by J-Paul Mesnage)

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!

Attachments (0)

Change History (2)

comment:1 by J-Paul Mesnage, 15 years ago

Description: modified (diff)

comment:2 by Valik, 14 years ago

Resolution: No Bug
Status: newclosed

This is not a bug specific to AutoIt. I was able to reproduce the same issue by using ControlClick() on a disabled Configure button in the Sound control panel applet. A configuration window popped up even though the Configure button was disabled.

Closing as no bug.

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.