ForegroundColor$
Jump to navigation
Jump to search
Description
- Sets the color of the text displayed in all controls.
Syntax
The variable is case sensitive.
- ForegroundColor$ = "named color"
Hints
- Placing the statement. The ForegroundColor$ value must be set before a window is opened. If more than one ForegroundColor$ value is declared, the last value set will be valid for that window.
- Colors. The color variables used for GUI controls can only use named colors.
Example
'set the foreground and background colors
nomainwin
BackgroundColor$ = "darkblue"
ForegroundColor$ = "lightgray"
statictext #dialog.static, "What is your name?", 10, 10, 100, 20
textbox #dialog.tbox, 10, 30, 100, 20
button #dialog.accept, "Accept", [gotIt], UL, 10, 55
open "Name getter" for dialog as #dialog
#dialog.tbox "Type your names in here."
#dialog "trapclose [quit]"
wait
[gotIt]
#dialog.tbox "!contents? name$"
notice "Hi "; name$
wait
[quit]
close #dialog
end
Useful Procedures
' Place a useful function or sub using this keyword here