Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- RLIB 3.0a Reference - <b>function:</b> fprompt() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Function:    FPROMPT()

Purpose:     Display color formatted and highlighted prompt strings.

Syntax:      FPROMPT( [ prompt [, color [, hilite [, row [, col ;
                      [, comma ] ] ] ] ] ] )

Arguments:   prompt      - The character string to format and print as the
                           prompt.  See the discussion below for the
                           format of <prompt>.

             color       - Optional character string which specifies the
                           color to use to display the prompt text which
                           appears at and to the right of the equal sign.
                           This color string must adhere to Clipper color
                           setting standards.  If omitted or a non-
                           character parameter is given, the default color
                           is the current SETCOLOR() setting.

             hilite      - Optional character string which specifies the
                           color to use to display the highlighted portion
                           of the prompt.  This highlighted portion
                           appears to the left of the equal sign.  This
                           color string must adhere to Clipper color
                           setting standards.  If omitted or a non-
                           character parameter is given, the default is
                           the BRIGHT() version of the current color
                           SETCOLOR().

             row         - Optional numeric value indicating the row on
                           which to display the formatted prompt.  If
                           omitted or a non-numeric value is passed, the
                           default row is row 24.  In the Clipper 5.0
                           version, the default row is MAXROW().

             col         - Optional numeric value indicating the starting
                           column on which to display the formatted
                           prompt.  If omitted or a non-numeric value is
                           passed, the default column is column zero.

             comma       - Optional single character which indicates the
                           character to recognize as the separator or
                           prompt token delimiter in the <prompt> string.
                           If omitted or a non-character is provided, the
                           default separator character is the comma.

Returns:     True if the <prompt> was displayed properly, false otherwise.

Description: FPROMPT() is a screen function used to paint prompts where a
             portion of the prompt is highlighted and another portion is
             in a normal display color.  As an example, when FPROMPT() is
             given the string "F1=Help,F10=Menu", FPROMPT() will say "F1"
             in a bright color with the "=Help" portion in the standard
             color.  FPROMPT()'s behavior is best understood through
             examples.

Notes:       The prompt string will be formatted to be centered on the row
             specified with an even number of spaces separating the
             individual elements, or tokens, in the prompt.  Each separate
             individual prompt element in the string must be separated
             with a single comma (or other character specified by the
             <comma> parameter), therefore, individual prompt elements may
             not contain embedded commas.  If you want an embedded comma
             in a prompt element, specify and use another delimiter
             character other than the comma.

             If no parameters are given, or if the <prompt> parameter is
             empty or non-character, FPROMPT() will clear the display line
             from the column indicated to the end of the screen.  If no
             column is specified, column zero is assumed.

             Clipper 5.0 Only!

             The 5.0 library version of FPROMPT() includes a companion
             function named SETFPROMPT().  This function is an example of
             the benefits of the static class of variables supported by
             Clipper 5.0.  The SETFPROMPT() function is used to
             pre-establish the values of the <color>, <hilite>, <row>,
             <col>, and <comma> arguments so that they need not be
             supplied in every call to FPROMPT().  This helps to reduce
             "code wordiness".  Because this would have to be implemented
             as a series of PUBLIC variables in the Summer '87 version,
             this feature is only included in the 5.0 version of the RLIB
             library.

             The syntax for SETFPROMPT() is the same as for FPROMPT(),
             just exclude the first parameter, <prompt>.

Example:     *-- this will paint a prompt with the F1, F9, F10, and Esc
             *-- portions displayed in Bright Cyan on Blue with the items
             *-- =Help, =Mark, =Select, and =Quit displayed in Cyan on
             *-- Blue.  Each option will be evenly spaced to center the
             *-- entire prompt on row 24, similar to the following:

             FPROMPT("F1=Help,F9=Mark,F10=Select,Esc=Quit","BG/B","BG+/B")

             F1=Help         F9=Mark         F10=Select         Esc=Quit


Source:      RL_FPROM.PRG

See also:    CENTER(), MIDDLE(), RJUSTIFY()

See Also: CENTER() MIDDLE() RJUSTIFY()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson