Jump to content

Recommended Posts

Posted

Hi guys,

I have a GUI, in which I have three groups to seperate the different areas of my GUI window. I want to be able to set the back colour of each Group, while leaving the GUI's colour the original grey. If I try GuiCtrlSetColor then it always changes the text colour of the Group Label but not the group itself.

Is there anyway to do this??

Thanks

Mark

Posted

Hi guys,

I have a GUI, in which I have three groups to seperate the different areas of my GUI window. I want to be able to set the back colour of each Group, while leaving the GUI's colour the original grey. If I try GuiCtrlSetColor then it always changes the text colour of the Group Label but not the group itself.

Is there anyway to do this??

Thanks

Mark

Yes, there is a way

#include <GUIConstants.au3>

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

GUICtrlCreateLabel ("", 190, 60, 90, 140)
GUICtrlSetState( -1, $GUI_DISABLE)

GUICtrlSetBkColor(-1,0x00ff00) ; Green
GUICtrlCreateGroup ("Group 1", 190, 60, 90, 140)
GUICtrlSetBkColor(-1,0x00ff00) ; Green
$radio_1 = GUICtrlCreateRadio ("Radio 1", 210, 90, 50, 20)
GUICtrlSetBkColor(-1,0x00ff00) ; Green
$radio_2 = GUICtrlCreateRadio ("Radio 2", 210, 110, 60, 50)
GUICtrlSetBkColor(-1,0x00ff00) ; Green
GUICtrlCreateGroup ("",-99,-99,1,1) ;close group

GUISetState ()    ; will display an empty dialog box

; Run the GUI until the dialog is closed
While 1
    $msg = GUIGetMsg()
    
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend

a little more work... but it does what you wanted

8)

NEWHeader1.png

Posted

Hey Valuater,

Creating a disabled label to create the colour, very clever and unfortunately I didn't work that one out. Thanks very much for your help.

Best Wishes

Mark

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
×
×
  • Create New...