Jump to content

Group GUICtrlSetBkColor


locutus243
 Share

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...