APPX is the Premier Development and Runtime Environment for Business Application Software
(Answer) (Category) FAQ's - APPX Software, Inc. : (Category) APPX Utility : (Category) APPX Development Environment : (Category) Input Processes :
How to set button (widget) colors!
When you create the button (or any other widget), assign a name on the
Button Properties screen.

In Pre-Display, based on the condition you wish to check:

     SET     --- WIDGET NAME =  <Name you gave the widget>
     READ    --- WIDGET HOLD 1 FT 0  BY WIDGET NAME
F    CANCEL      Widgit not found
     IF          <Condition you need to test on>
T    SET     --- WIDGET COLOR EN FG R  = <red value: 0-255>
T    SET     --- WIDGET COLOR EN FG B  = <blue value: 0-255>
T    SET     --- WIDGET COLOR EN FG G  = <green value 0-255>
T    SET     --- WIDGET COLOR EN BG R  = <red value: 0-255>
T    SET     --- WIDGET COLOR EN BG B  = <blue value: 0-255>
T    SET     --- WIDGET COLOR EN BG G  = <green value 0-255>
    *       Set the default color for button 
F    SET     --- WIDGET COLOR EN FG R  = <red value: 0-255>
F    SET     --- WIDGET COLOR EN FG B  = <blue value: 0-255>
F    SET     --- WIDGET COLOR EN FG G  = <green value 0-255>
F    SET     --- WIDGET COLOR EN BG R  = <red value: 0-255>
F    SET     --- WIDGET COLOR EN BG B  = <blue value: 0-255>
F    SET     --- WIDGET COLOR EN BG G  = <green value 0-255>
   *
     SET     --- WIDGET COLOR EN FG NL = 1   <so color is not ignored>
     SET     --- WIDGET COLOR EN BG NL = 1   <so color is not ignored>
     REWRITE --- WIDGET FAIL 0

The color values are the decimal values for the colors.  For example; hex 
color value #FFFFFF (white) is decimal value 255 for red, green, and blue.

The FG fields set the text color (foreground) on the button.  The BG fields 
set the background color.  When you save the ILF READ and WRITE statements, 
if it says the widget file could not be found, use Opt 88 to save the code.
[Append to This Answer]
2005-Jan-12 2:52pm
Previous: (Answer) When using the PICTURE command I get Load Error!
Next: (Answer) How to print tech doc for GUI input processes?
This document is: http://board.appx.com/cgi-bin/fom.cgi?file=180
[Search] [Appearance]
This is a Faq-O-Matic 2.719.
Copyright 2003 by APPX Software, Inc. All rights reserved.