Jump to content
Sign in to follow this  
Valuater

Problems with GUICtrlSetBkColor

Recommended Posts

Valuater

Problems with GUICtrlSetBkColor

1. The color does not clear for labels in the attached example, all other controls do

2. Is there anyway to get the color from the control... working example

$ret_option = Opt("WinTitleMatchMode", 4)

sleep($time)

Opt("WinTitleMatchMode", $ret_option)

this will return the original option

3. Buttons can be colored As demonstrated by gafrost, However it takes too much time from my script

to call that UDF ... can i get the "ThickFrame or Border" to change colors?

( using a similar style As this example)

#include <GUIConstants.au3>

Dim $Control_[13], $time = 500


GUICreate("My GUI") ; will create a dialog box that when displayed is centered

; just a quck example here
$Control_[1] = GUICtrlCreateTab(90, 75, 200, 60)
GUICtrlCreateTabitem("Tab 1")
$Control_[12] = GUICtrlCreateLabel("Inside Tab 1", 110, 110, 102, 17)
GUICtrlCreateTabitem ("")

$Control_[2] = GuiCtrlCreateGroup("Example", 60, 55, 270, 300)
$Control_[3] = GuiCtrlCreateProgress(90, 140, 200, 20)
$Control_[4] = GuiCtrlCreateRadio("Radio3", 80, 170, 60, 20)
$Control_[5] = GuiCtrlCreateRadio("Radio4", 150, 170, 60, 20)
$Control_[6] = GuiCtrlCreateCheckbox("Checkbox5", 220, 170, 80, 20)
$Control_[7] = GUICtrlCreateButton("Button 1", 210, 300, 90, 40,$WS_THICKFRAME )
$Control_[8] = GuiCtrlCreateSlider(90, 200, 200, 20)
$Control_[9] = GuiCtrlCreateList("", 80, 230, 100, 110)
$Control_[10] = GUICtrlCreateButton("Button 2", 210, 230, 90, 30, $WS_BORDER)
$Control_[11] = GUICtrlCreateLabel("Label 1", 210, 270, 90, 30)
GUISetState()

sleep($time * 5)

for $x = 1 to 12
    
$ret_color = GUICtrlSetBkColor( $Control_[$x], 0xD4D4D8 )
Sleep($time)

; what i would like to do is
;GUICtrlSetBkColor( $Control_[$x], $ret_color ); doesn't work

Sleep($time)
GUICtrlSetBkColor( $Control_[$x], $GUI_BKCOLOR_TRANSPARENT )
; GUICtrlSetState($Control_[$x], $GUI_FOCUS) ; doesn't work

Next

MsgBox(64, "Note **", "The *Labels* do not reflect the color return as do the others   " & @crlf & "But... if you slide this message box over the labels... they are cleared   ")

thank you

Valuater

8)

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites
Valuater

Should i create a "bug report" for item @1?

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.