Modify

Opened 17 years ago

Closed 17 years ago

#1105 closed Bug (Fixed)

Vertical Button, Double Label When Disabled

Reported by: anonymous Owned by: J-Paul Mesnage
Milestone: 3.3.1.2 Component: AutoIt
Version: 3.3.0.0 Severity: None
Keywords: Cc:

Description

Version 3.3.0.0

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 $GUI_EVENT_CLOSE
			ExitLoop
		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")
			Else
				$iCount = 1
				GUICtrlSetBkColor($bPrint, -1)
				GUICtrlSetState($bPrint, $GUI_DISABLE)
				GUICtrlSetData($lLabel, "Button Disabled," & @LF & @LF & "Double label")
			EndIf
	EndSwitch
WEnd

Exit

Attachments (0)

Change History (1)

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

Milestone: 3.3.1.2
Owner: set to J-Paul Mesnage
Resolution: Fixed
Status: newclosed

Fixed in version: 3.3.1.2

Modify Ticket

Action
as closed The owner will remain J-Paul Mesnage.

Add Comment


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