[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 WBOX()
 Places a frame around the active window
------------------------------------------------------------------------------
 Syntax

     WBOX([<cFramecharacter|nFrametype>]) --> nCurrentWindow

 Arguments

     <cFramecharacter>  Designates a string of up to nine characters.

     <nFrametype>  Designates one of eight different border types.

     ()  If the function is called without parameters, a double line border
     is created automatically and the window is filled with the CLEARB
     character (see SETCLEARB()).

 Returns

     WBOX() returns the number of the current window.

 Description

     This function works like the CA-Clipper @...BOX command, except that
     WBOX() always encloses the currently selected window.  You can specify
     an individual character with which to frame the entire window.  You can
     specify up to nine different characters for the corners, and the
     horizontal and vertical lines.  You can also specify a character with
     which to fill the window.  The frame characters start to fill the frame
     in the upper left corner and continue clockwise around the frame.  When
     specified, the ninth character is used to fill the window.

     There is a simplified way to specify eight basic border types.  If you
     choose to pass a numeric entry, instead of the string of characters,
     WBOX() interprets the numeric entry as shorthand for defining a box
     type.  The following sample shows the border types assigned to each of
     the 16 values.  Notice that numbers between 0 and 3, and 8 and 11,
     delete the area in the window while the other numbers do not.

 Frame types:

     Delete:                     0          1            2      3

     Do Not Delete:              4          5            6      7



     Delete:                      8         9              10   11

     Do Not Delete:              12         13             14   15

 Notes

     .  The available work area for the window is reduced by two rows
        and two columns (corresponds to a WFORMAT(1, 1, 1, 1)).  This
        prevents the border from being unintentionally overwritten.  When
        WBOX() is called a second time, the window is reduced again.  If a
        window is too small to frame, WBOX() returns a value of -1 and
        changes nothing.

     .  If you want to put a title in a frame, you can place the title
        in the top row of the window border by specifying @ .. SAY for the
        row.

 Examples

     .  This function frames a window with a double row and then fills
        it.  The window output area is automatically reduced by 1 for each
        page:

        WSELECT(nWindow)
        WBOX("  ")

     .  This code shows a frame with simple lines, filled with
        CHR(177):

        SETCLEARB(177)        // The delete character
        WBOX(1)               // Box type 1, delete interior


See Also: WOPEN() WSELECT() WFORMAT() SETBOXGROW() SETCLEARB()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson