Radio Button color

Radio Button color

Postby Rick Lipkin » Tue May 20, 2008 2:16 pm

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: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Postby Rick Lipkin » Tue May 20, 2008 10:37 pm

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

Postby Colin Wisbey » Wed May 21, 2008 2:04 am

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

Postby mmercado » Wed May 21, 2008 5:17 am

Hi:

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

Regards.

Manuel Mercado.
User avatar
mmercado
 
Posts: 782
Joined: Wed Dec 19, 2007 7:50 am
Location: Salamanca, Gto., México


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot], nageswaragunupudi and 69 guests