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> borderbox() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Function:    BORDERBOX()

Purpose:     Draw a box with a one line title area at the top.

Syntax:      BORDERBOX( t,l,b,r, title, [,clear [,box  [,color ]]] )

Arguments:   t,l,b,r     - Numeric values specifying the Top, Left, Bottom
                           and Right screen coordinates of the display
                           box.  The top and bottom row values must be
                           between 0 and 24 (MAXROW() in 5.0), and the
                           left and right column values must be between 0
                           and 79.

             title       - Character string or expression to display as a
                           title in the box header area.

             clear       - Optional logical flag telling BORDERBOX()
                           whether or not to clear the box area.  If
                           omitted or a non-logical parameter is passed,
                           the default value is True.

             box         - Optional character string to be used as the box
                           characters.  Specify either double, single, or
                           solid box characters.  If omitted or a non-
                           character value is passed, the default is
                           double.

             color       - Optional character string to use as the color
                           setting for the border box and header.  If
                           omitted or a non-character value is passed, the
                           default is SETCOLOR().

Returns:     True if the box was painted, false if an error occurred or if
             any required parameters are missing or are an invalid type.

Description: This function paints a double line box with a one line title
             in it.  You can optionally specify whether or not to clear
             the inside area.

Notes:       The first four parameters are required.  If omitted, the box
             will not be drawn and a false value returned.  If you do not
             want a title in the box, pass a null string ("") for the
             title parameter.

             The title string is centered in the header area of the border
             box.  Because of this centering feature, no provision is made
             to truncate the string if it is too wide to fit in the width
             of the box.  Therefore, you must ensure that the title string
             is not wider that the width of the inside of the box.  If so,
             the title string will spill over on the left and right sides.

             A false value for the clear parameter is useful for not
             disturbing the contents of a previously displayed box on
             re-entry.  If omitted, the inside of the box area is cleared
             by default.

             The box parameter lets you customize the frame.  However, the
             concept of the border box is that the left side of the border
             line must match the horizontal boxing character.  This
             function only uses three characters, the single side (|), the
             double side (-), and the solid side (#).  If the vertical
             part of your box character string is none of these, you will
             need to modify this function, or use only single, double or
             solid boxes.  See the Clipper documentation on the @ ...  BOX
             ..  command for more information on box strings.

Example:     *-- set up a bordered box for a PICKREC() display to show a
             *-- help pick list of available Account numbers

             top    =  1
             left   = 40
             bottom = 10
             right  = 68
             title  = "AVAILABLE ACCOUNT NUMBERS"
             BORDERBOX( top, bottom, left, right, title )

             *-- now fill with PICKREC() selections, note that the
             *-- PICKREC() coordinates are offset 1 row/column in
             display = "' '+AcctNum+' - '+AcctName+' '"

             choice = PICKREC(top+3, left+1, bottom-1, right-1, display)

             *-- output will look something like this
             *                        +---------------------------+
             *                        | AVAILABLE ACCOUNT NUMBERS |
             *                        ----------------------------|
             *                        | 1000 - OFFICE SUPPLIES    |
             *                        | 1001 - EQUIPMENT PURCHASE |
             *                        | 1002 - EQUIPMENT LEASE    |
             *                        | 1003 - TELEPHONE EXPENSE  |
             *                        | 1004 - RENT               |
             *                        | 1005 - UTILITIES          |
             *                        +---------------------------+

Source:      RL_BORDE.PRG

See also:    PICKREC(), POPUPPICK()

See Also: PICKREC() POPUPPICK()

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