Jump to content

GUICTRLSETCOLOR()


Recommended Posts

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

Link to comment
Share on other sites

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 :)

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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?

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...