Sign in to follow this  
Followers 0
gpence

GUI background color

5 posts in this topic

Is there a way to set the background color on the GUI when I create it, or do I just create a .gif with the background color and place that control on the GUI??

Thx,

gpence

Share this post


Link to post
Share on other sites



Thanks GAFROST. I did finally find it in the documentation, but it did take me 3 clicks from the GUICreate page to find it and because I'm a newbie, GUISetBkColor isn't so intuitive. I did also search the forums for color and background, but after reading 6 of the 10+ pages of results, I gave up and asked...

At any rate, I cut the example from the manual and inserted it here:

#region --- GuiBuilder code Start ---
; Script generated by AutoBuilder 0.5 Prototype
GuiCreate("Vault II Transfer Auditor", 600, 300,(@DesktopWidth-600)/2, (@DesktopHeight-300)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)
$Pic_1 = GuiCtrlCreatePic("test_control/v2audit6.gif", (600-301)/2, 20, 301, 130)
$Btn_Close = GUICtrlCreateButton ("Close", 450, 240, 90, 35, $BS_CENTER + $BS_DEFPUSHBUTTON + $BS_VCENTER)

GUISetBkColor(0xFFFFFF)   ; set color to white

GUICtrlSetState($Pic_1,$GUI_DISABLE)
GuiSetState()

but I still get a gray background on the GUI... ?

Thanks,

gpence

Share this post


Link to post
Share on other sites

Remove this...

+ $WS_VISIBLE

and it works

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Remove this...

+ $WS_VISIBLE

and it works

8)

<{POST_SNAPBACK}>

Eureka!

Thanks Valuater!

gpence

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  
Followers 0