Modify ↓
#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)
comment:1 by , on Jan 13, 2008 at 6:32:26 AM
| Keywords: | osversion? added; GUICtrlSetBkColor BitOR removed |
|---|---|
| Owner: | set to |
| Status: | new → assigned |
comment:2 by , on Jan 13, 2008 at 9:08:31 AM
| Owner: | changed from to |
|---|
comment:3 by , on Jan 14, 2008 at 8:55:32 PM
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 , on Jan 15, 2008 at 5:55:01 PM
| Resolution: | → nobug |
|---|---|
| Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.

Replying to atomman:
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