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)
comment:1 by , 18 years ago
| Keywords: | osversion? added; GUICtrlSetBkColor BitOR removed |
|---|---|
| Owner: | set to |
| Status: | new → assigned |
comment:2 by , 18 years ago
| Owner: | changed from to |
|---|
comment:3 by , 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 , 18 years ago
| 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