Xbasic
{COLOR}
IN THIS PAGE
Syntax
{COLOR= Foreground_Color ON Background_Color }
Arguments
- Foreground_Color
Character. The name of an Alpha Anywhere color (see A5.COLOR_ENUM()). Defines the text color of a control.
- Background_Color
Character. The name of an Alpha Anywhere color (see A5.COLOR_ENUM()). Defines the background color of a textbox control.
Description
Sets the foreground color for some types of controls
Discussion
The {COLOR} command allows you to set the foreground color for the following controls on an Xdialog:
Textbox
Frame
Line
Radio Button
Checkbox
Buttons
In addition, the command sets the background color for textbox controls.
Example
The script below creates this dialog.
dim lastname as c = "Jones" dim sampleText as c = a5.color_enum() ui_dlg_box("",<<%dlg% {font=tahoma,10,B}Color and Font Styles Demo;{font=} {wrap=140} The controls shown here \(line, frame, button, radio button, checkbox and textbox) use the default font color - WinText on Win3D background.; {line=1This is a Line Control}; {lf}; {frame=1,1Frame} {region}
Radio buttons: (num:One)(num:Two) Checkbox:(checked) {sp=5}Edit control: |[.40lastname]; {endregion}; {lf}; Here, we repeat all of the controls, but we set the color to Blue on a Yellow background. Note that the background color only applies to textbox controls.;; {color=Blue on Yellow} {lf}; {line=1This is a Line Control}; {lf}; {frame=1,1Frame} {region}
Limitations
Desktop applications only