Dynamic text colors in screens

Dynamic text colors in screens

Post by Darren Storkam » Wed, 20 Dec 1995 04:00:00



I am working on an application that allows the user to select one
of four options on the screen.  Once a selection is made, I would
like that option to appear in a different color.  I could
hard-code coordinates and colored text into a VALID statement,
but I would like it to be dynamic and generate properly.  Any
suggestions?  Thanks!

Darren.

 
 
 

Dynamic text colors in screens

Post by Steven H. Singerma » Thu, 21 Dec 1995 04:00:00



>  I am working on an application that allows the user to select one
>  of four options on the screen.  Once a selection is made, I would
>  like that option to appear in a different color.  I could
>  hard-code coordinates and colored text into a VALID statement,
>  but I would like it to be dynamic and generate properly.  Any
>  suggestions?  Thanks!

 More specifics required please :

 What platform are you working on ?
 DOS would be relatively simple, however graphical interfaces like WINDOWS and MAC
 would be harder.

 What type of objects are these four screen options:  SAY, GET, ... ?

 One method (DOS mainly) is to store the COLOR pair in a memory variable and then extend
 the use of the GET's WHEN clause as follows :

        WHEN   .T.    COLOR  &cCOLOR

 SAY objects would have to be changed to GET objects with the following WHEN clause :

        WHEN  .F.     COLOR  &cCOLOR

 This works in the screen-builder in case you're wondering.  Simply add the COLOR command
 as above to your WHEN expression.   NOTE:  must be an expression NOT a procedure !!!

 Hope this helps,

*--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--*
  Steven H. Singerman
  President, Creative Logic


  Web-site: http://www.clogic.ca
*--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--*

 
 
 

Dynamic text colors in screens

Post by Brian Copela » Fri, 22 Dec 1995 04:00:00


7>I am working on an application that allows the user to select one
7>of four options on the screen.  Once a selection is made, I would
7>like that option to appear in a different color.  I could
7>hard-code coordinates and colored text into a VALID statement,
7>but I would like it to be dynamic and generate properly.  Any
7>suggestions?  Thanks!

7>Darren.

Can you give more information about what type of object you are using?

eg:  push buttons
     radio buttons
     check boxes
     regular field
     text label

Would SHOW GET(s) with a COLOR clause handle what you want?