﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
1105	Vertical Button, Double Label When Disabled	anonymous	Jpm	"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
}}}
"	Bug	closed	3.3.1.2	AutoIt	3.3.0.0	None	Fixed		
