[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
SetMenuColor()
Set or get the MENU colors.
------------------------------------------------------------------------------
Syntax:
SetMenuColor( [<aNewMenuColors>] ) --> <aMenuColors>
OR
SetMenuColor( <nColor> ) --> <cColor>
OR
SetMenuColor( <cNewMenuColors> ) --> <cFullColorStr>
OR
SetMenuColor( <lWhen> ) --> <cPairColorStr>
Arguments:
<aNewMenuColors> is an optional array containing the five color pairs
used by the MENU system.
<aMenuColors> is an array containing the current five color pairs used
by the MENU system.
<nColor> is numeric expression from 1 to 5 representing the
corresponding current color pair of the MENU system.
<cColor> is character string representing a requested color pair.
<cNewMenuColors> is a character string containing the five color pairs
used by the MENU system.
<cFullColorStr> is a character string containing the five color pairs
used by the MENU system.
<lWhen> is a logical representing a passed or failed WHEN clause.
<cPairColorStr> is a character string containing two color pairs. The
first color pair represents the color when the PROMPT is not in focus
and the second is when it is in focus. Depending on the value of
<lWhen> the first color pair will contain the color for an available
PROMPT or an unavailable PROMPT.
Description:
The PROMPTS in the MENU system require 5 color pairs to operate:
1 - accessible prompt color
2 - highlighted prompt color
3 - unaccessible prompt color
4 - hot character in accessible prompt
5 - highlighted unaccessible prompt color
The MENU system displays all PROMPTs in an accessible color with the Hot
key displayed in the hot character color unless the WHEN clause of a
PROMPT fails, then the PROMPT is displayed in the unaccessible color
only. When the highlight bar lands on a PROMPT the PROMPT is then
displayed in the highlighted PROMPT color.
Example:
The follow example will set the MENU colors to white on black for
available PROMPTS, bright white on black for the hot key, black on white
(reverse) for the highlighted PROMPT, and grey on black for
nonaccessable (failed WHEN) PROMPTS. In addition the old colors are
saved to be restored at the end of the module.
LOCAL aOldMenuColor := SetMenuColor( "W/N,N/W,N+/N,W+/N,N+/W" )
.
.
.
SetMenuColor( aOldMenuColor )
Files: Library is CUACLIP.LIB.
See Also:
@...PROMPT
MENU TO
SetPullColor()
DEMO.PRG
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson