Boxes can be used to separate a group of fields from the rest of the form, to separate scrollable regions from the rest of the form, and to generally format your data form.
Designer: Boxes can be added to your form in the Designer. See the Designer User's Guide for more information.
Code: To define a box for a form, use the background box definition function, bg_boxdef():
|
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
In the call, you specify the window coordinates where you want the upper-left corner of the box to start (wn_rb and wn_cb), the size of the box (rowq and colq), the type of characters to use to draw the box (bdrp), and the attribute to use to draw the box border (att). The box is not filled in with the specified attribute.
Possible border types for the box are shown in Table 15.2. If you want to create your own border type, see Chapter 25, "Changing the Appearance of Windows," for more information.
Table 15.2: Box Types
| Border Pointer | Type of Border for Box |
| BDR_SLNP | Single-line border |
| BDR_DLNP | Double-line border |
| BDR_SPACEP | Space character border |
| BDR_DOTP | Stippled block graphics character or dot/colon border |
| BDR_STARP | Asterisk border |
| BDR_SOLIDP | Solid block graphics character or space border |
Border appearance is operating system dependent. In PCDOS or OS/2, single- and double-line boxes use the proper intersection characters when intersecting other single or double lines or boxes. In terminal versions, intersection characters are used only when lines of the same type intersect.
There are a number of limitations associated with output of block graphics characters in terminal versions. See Chapter 54, "Writing Portable Code," for more information on border-drawing, line-drawing and the block graphics attribute if you are using a terminal-based version of Vermont Views.