Sign in to follow this  
Followers 0
sensalim

Coloring group

6 posts in this topic

$Group1 = GUICtrlCreateGroup("Group Name", 8, 316, 314, 117)
GUICtrlSetBkColor(-1, 0x00ff00)
;bg color changes to green
GUICtrlSetColor(-1, 0x000000)
;text color does not change! why?

What's the proper way of doing color?

Can it color its background ('block')?

Share this post


Link to post
Share on other sites



$Group1 = GUICtrlCreateGroup("Group Name", 8, 316, 314, 117)
GUICtrlSetBkColor(-1, 0x00ff00)
;bg color changes to green
GUICtrlSetColor(-1, 0x000000)
;text color does not change! why?

What's the proper way of doing color?

Can it color its background ('block')?

Search for it.

Share this post


Link to post
Share on other sites

Hi! This is a trick, but can help you:

#include <GuiConstants.au3>

$hGui = GuiCreate("Colored group", 300, 200)

GUICtrlCreateLabel("", 24, 20, 250, 150)
GUICtrlSetBkColor(-1, 0xDDDDDD)
GUICtrlSetState(-1, $GUI_DISABLE)

$hGroup = GUICtrlCreateGroup("My group", 24, 14, 250, 157, $BS_CENTER)
GUICtrlSetBkColor(-1, 0xDDDDDD)
GUICtrlCreateRadio("Radio1", 40, 40, 54, 18)
GUICtrlSetBkColor(-1, 0xDDDDDD)

GUICtrlCreateRadio("Radio2", 40, 80, 54, 18)
GUICtrlSetBkColor(-1, 0xDDDDDD)

GUICtrlCreateRadio("Radio3", 40, 120, 54, 18)
GUICtrlSetBkColor(-1, 0xDDDDDD)
GUICtrlCreateGroup("", -99, -99, 1, 1)

GUISetState()

Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
:)

Share this post


Link to post
Share on other sites

Ah a trick. It works, thanks.

(only if I use windows classic style) -- why doesn't it work on xp or tabletpc style?

Share this post


Link to post
Share on other sites

sensalim

(only if I use windows classic style) -- why doesn't it work on xp or tabletpc style?

What? Work for me, i used XP style... :)

Share this post


Link to post
Share on other sites

Again, I direct you to the search function. This question has been asked at least 100 times in the past year... Search for "color group" and you'll find your answer.

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