Radio Button color

Post Reply
User avatar
Rick Lipkin
Posts: 2397
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Radio Button color

Post 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
User avatar
Rick Lipkin
Posts: 2397
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Post 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
Colin Wisbey
Posts: 56
Joined: Mon Jul 03, 2006 2:34 am

Post 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()
User avatar
mmercado
Posts: 782
Joined: Wed Dec 19, 2007 7:50 am
Location: Salamanca, Gto., México

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