Function DispBox() Foundation
Displays a box on the screen.
DispBox( <nTop>, <nLeft>, <nBottom>, <nRight>, ;
[<cnBoxString>] , [<cColor>] ) --> NIL
The return value of DispBox() is always NIL.
The screen function DispBox() displays a box with the specified coordinates, color and border characters. The border is defined by <cnBoxString>. When the argument contains a character string, the first eight characters are used to display the border. The first character defines the upper left corner of the box, the following characters define the border sides and corners in a clockwise direction. The box is filled with the ninth character. When the ninth character is not specified, only the border of the box is output and the screen area within the box remains unchanged.
The function DispBox() sets the cursor to the position <nTop>+ 1and <nLeft>+ 1. Row() and Col() return this new values for the cursor position.
In the file Box.ch (in the directory \XPP\INCLUDE) various constants for the border of a box are defined. Note that an appropriate system font must be installed for the graphic characters of a box border to be displayed correctly.
// The example displays four boxes showing
// various possibilities for DispBox()
#include "Box.ch"
PROCEDURE Main
LOCAL cBox
CLS
DispBox(7,10,17,60,1) // single line box in
Inkey(0) // default system color
DispBox(7,10,17,60,2,"W+/B") // double line in bright
Inkey(0) // white on blue background
cBox := B_SINGLE
@ 9,11 SAY "Output before DispBox()" // single line with
DispBox(7,10,17,60,cBox) // no fill character
@ Row(),Col() SAY "Output after DispBox(). Box string: " + cBox
Inkey(0)
cBox := B_DOUBLE + Chr(176)
@ 9,11 SAY "Output before DispBox()" // double line with
DispBox(7,10,17,60,cBox,"N/BG") // fill character
@ Row(),Col() SAY "Output after DispBox(). Box string: " + cBox
Inkey(0)
RETURN
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.