Jump to content
Sign in to follow this  
CodyBarrett

GUICTRLSETCOLOR()

Recommended Posts

CodyBarrett

i have radios and cannot set the text color of them at all any help?

Share this post


Link to post
Share on other sites
enaiman

There are several solutions for what you want.

One is fidgeting with XP theme (toggel it on and off) and if you do a forum search this will definitely come up with a nicely done example.

Second: use a transparent label on top of the radio like this:

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

Opt("GUIOnEventMode", 1)
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 188, 138, 193, 125)
GUISetBkColor(0xC0DCC0)
GUISetOnEvent($GUI_EVENT_CLOSE, "Form1Close")
$Radio1 = GUICtrlCreateRadio("Radio1", 16, 32, 113, 17)
GUICtrlSetOnEvent(-1, "Radio1Click")
;that's the part you want-----
$Radio2 = GUICtrlCreateRadio("", 16, 72, 17, 17)
GUICtrlSetOnEvent(-1, "Radio2Click")
$Label1 = GUICtrlCreateLabel("Radio2", 34, 73, 44, 17)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0xFF0000)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
;-----------------------------
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    Sleep(100)
WEnd

Func Form1Close()
    Exit
EndFunc
Func Radio1Click()

EndFunc
Func Radio2Click()

EndFunc

SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Share this post


Link to post
Share on other sites
CodyBarrett

so... you mean make a label ontop of the text in the radio but not overtop of the circle?

Share this post


Link to post
Share on other sites
enaiman

If you try to stack the controls they won't work anymore - have a play with the coordinates and see.


SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Share this post


Link to post
Share on other sites
CodyBarrett

i have i made the radio coords like this ('', 20, 20, 20 ,20) and the label coords like this.. ('RADIO1', 40, 25, 60, 20)

is there more controls that you cannot change the colors of

ex

Radios=text - NO

Tabs=Bk_Color - NO

anything else?

Share this post


Link to post
Share on other sites
enaiman

Yeah, there are several more: checkboxes, group titles comes to my mind first.


SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

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  

×