Opened 15 years ago

Closed 15 years ago

#1105 closed Bug (Fixed)

Vertical Button, Double Label When Disabled

Reported by: anonymous Owned by: Jpm
Milestone: Component: AutoIt
Version: Severity: None
Keywords: Cc:



When "$BS_MULTILINE" is assigned to a button, and the color of that button is changed, and the button is disabled, the label is printed twice. The following script will demonstrate the issue.

#include <GUIConstantsEx.au3>
#include <ButtonConstants.au3>
$iGUI = GUICreate("Vertical Button Bug", 220, 230)
$bPrint = GUICtrlCreateButton("P" & @LF & "R" & @LF & "I" & @LF & "N" & @LF & "T", 25, 25, 40, 75, $BS_MULTILINE)
GUICtrlSetState(-1, $GUI_DISABLE)
$bTogglePrint = GUICtrlCreateButton("Click me a few times", 80, 25, 120, 30)
$lLabel = GUICtrlCreateLabel("Button Disabled," & @LF & @LF & "OK initially", 80, 60, 120, 90)
GUICtrlCreateLabel("Vertical Button Double Label Bug" & @LF & @LF & "Please note this bug does not appear unless the button background color is changed, and then it affects all colors, even the background color, whenever the button is disabled.", 10, 120, 190, 90)
GUISetState(@SW_SHOW, $iGUI)

$iCount = 0
While 1
	$iMsg = GUIGetMsg()
	Switch $iMsg
		Case $bTogglePrint
			$iCount += 1
			If $iCount = 1 Then
				GUICtrlSetBkColor($bPrint, -1)
				GUICtrlSetState($bPrint, $GUI_ENABLE)
				GUICtrlSetData($lLabel, "Button Enabled," & @LF & @LF & "OK")
			ElseIf $iCount = 2 Then
				GUICtrlSetBkColor($bPrint, 0xff0000)
				GUICtrlSetState($bPrint, $GUI_DISABLE)
				GUICtrlSetData($lLabel, "Button Disabled," & @LF & @LF & "Double label")
			ElseIf $iCount = 3 Then
				GUICtrlSetBkColor($bPrint, 0xff0000)
				GUICtrlSetState($bPrint, $GUI_ENABLE)
				GUICtrlSetData($lLabel, "Button Enabled," & @LF & @LF & "OK again")
				$iCount = 1
				GUICtrlSetBkColor($bPrint, -1)
				GUICtrlSetState($bPrint, $GUI_DISABLE)
				GUICtrlSetData($lLabel, "Button Disabled," & @LF & @LF & "Double label")


Attachments (0)

Change History (1)

comment:1 Changed 15 years ago by Jpm

  • Milestone set to
  • Owner set to Jpm
  • Resolution set to Fixed
  • Status changed from new to closed

Fixed in version:

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

as closed The owner will remain Jpm.

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

Note: See TracTickets for help on using tickets.