Modify

Opened 8 years ago

Closed 8 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 Jpm)

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 Changed 8 years ago by Jpm

  • Description modified (diff)

comment:2 Changed 8 years ago by Valik

  • Resolution set to No Bug
  • Status changed from new to closed

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.

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.