Modify

Opened 11 years ago

Closed 11 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 in reply to: ↑ description Changed 11 years ago by Jpm

  • Keywords osversion? added; GUICtrlSetBkColor BitOR removed
  • Owner set to Jpm
  • Status changed from new to assigned

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 Changed 11 years ago by Jpm

  • Owner changed from Jpm to WaitingUserInfo

comment:3 Changed 11 years ago by Gary

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

comment:4 Changed 11 years ago by Jpm

  • Resolution set to nobug
  • Status changed from assigned to closed

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The owner will remain WaitingUserInfo.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.