Page 1 of 1

Radio Button color

Posted: Tue May 20, 2008 2:16 pm
by Rick Lipkin
To All

I have an application that has 4 groups of radio buttons and visually, the user wants the description of each radion button to be a different color

Like this :

Budget Schedule ... so on ( 4) groups

* Green * Green
* Yellow * Yellow
* Red * Red
* Blue * Blue

How can I redefine a color for the description ( prompt ) of each radio button .. I have never done anything like this nor do I see anything specific about "prompt" color options??

TIA
Rick Lipkin
SC Dept of Health, USA

Posted: Tue May 20, 2008 10:37 pm
by Rick Lipkin
To All

I had to go about this with not grouping radio buttons but to have each button stand alone. Then I can apply the COLOR clause on a single radio button.

Made the code much more difficult and I had to write a valid clause to 'zero' out any other radio buttons in the same column if one was chosen or changed within the same group..

If anyone would like .. I can share the code ..

Rick Lipkin

Posted: Wed May 21, 2008 2:04 am
by Colin Wisbey
I had a similar need. I simply used separate SAYs instead of prompts for the radio buttons and I have an ON CHANGE clause for the radios that resets to colors of the SAYs.

The radios' ON CHANGE contains code like:

oPromptF1:SetColor(xcolrF1, nClrBack)
oPromptF2:SetColor(xcolrF2, nClrBack)

oPromptF1:Refresh()
oPromptF2:Refresh()

Posted: Wed May 21, 2008 5:17 am
by mmercado
Hi:

For people who accept third party classes, TSRadio can do that (multicolor captions). TSRadio is part of TSButton library.

Regards.

Manuel Mercado.