Modify

Opened 18 years ago

Closed 18 years ago

#30 closed Bug (No Bug)

GUICtrlSetBkColor() bug with GUICtrlCreateLabel() and GUICreate with BitOR()

Reported by: atomman Owned by: WaitingUserInfo
Milestone: Component: AutoIt
Version: 3.2.10.0 Severity:
Keywords: osversion? Cc:

Description

With every combo of BitOR() i've tried, GUICtrlSetBkColor() fails. If BitOR() is removed, GUICtrlSetBkColor() works fine. Run the code as is, color won't change. Comment out L2 and uncomment L3, it works fine. Behavior is same with GUICtrlCreateGraphic() as well, maybe others.

#include <GUIConstants.au3>
$Win_SBS = GUICreate("SpeedBlog - Satellite", 556, 204, -1, -1, BitOR($WS_CLIPCHILDREN,$WS_POPUP))
;$Win_SBS = GUICreate("SpeedBlog - Satellite", 556, 204, -1, -1)
GUISetFont(8, 400, 0, "Arial")
$Label1 = GUICtrlCreateLabel("", 193, 113, 8, 15)
GUICtrlSetBkColor(-1, 0x00FF00)
$Button1 = GUICtrlCreateButton("Button1", 292, 80, 75, 25, 0)
GUISetState(@SW_SHOW)
While 1
	$nMsg = GUIGetMsg()
	Switch $nMsg
		Case $GUI_EVENT_CLOSE
			Exit
		Case $Button1
			GUICtrlSetBkColor($Label1, 0xFF0000)
	EndSwitch
WEnd

Attachments (0)

Change History (4)

in reply to:  description comment:1 by J-Paul Mesnage, 18 years ago

Keywords: osversion? added; GUICtrlSetBkColor BitOR removed
Owner: set to J-Paul Mesnage
Status: newassigned

Replying to atomman:

With every combo of BitOR() i've tried, GUICtrlSetBkColor() fails. If BitOR() is removed, GUICtrlSetBkColor() works fine. Run the code as is, color won't change. Comment out L2 and uncomment L3, it works fine. Behavior is same with GUICtrlCreateGraphic() as well, maybe others.

#include <GUIConstants.au3>
$Win_SBS = GUICreate("SpeedBlog - Satellite", 556, 204, -1, -1, BitOR($WS_CLIPCHILDREN,$WS_POPUP))
;$Win_SBS = GUICreate("SpeedBlog - Satellite", 556, 204, -1, -1)
GUISetFont(8, 400, 0, "Arial")
$Label1 = GUICtrlCreateLabel("", 193, 113, 8, 15)
GUICtrlSetBkColor(-1, 0x00FF00)
$Button1 = GUICtrlCreateButton("Button1", 292, 80, 75, 25, 0)
GUISetState(@SW_SHOW)
While 1
	$nMsg = GUIGetMsg()
	Switch $nMsg
		Case $GUI_EVENT_CLOSE
			Exit
		Case $Button1
			GUICtrlSetBkColor($Label1, 0xFF0000)
	EndSwitch
WEnd

Please describe the environment you are running with as XP/Sp2 US X86
In fact under Vista your script is producing the same result a little green square

comment:2 by J-Paul Mesnage, 18 years ago

Owner: changed from J-Paul Mesnage to WaitingUserInfo

comment:3 by Gary, 18 years ago

Might want to look up what $WS_CLIPCHILDREN does, you'll never get the child control(s) to repaint with that set.

comment:4 by J-Paul Mesnage, 18 years ago

Resolution: nobug
Status: assignedclosed

Modify Ticket

Action
as closed The owner will remain WaitingUserInfo.

Add Comment


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