Please enable JavaScript to view this site.

A-Shell Reference

Navigation: Subroutines > AUI > AUI_CONTROL > Control Types

Lines, Rectangles and Frames

Scroll Prev Top Next More

These controls share the same STATIC class with static text controls, and are even simpler than their cousins, except that creating them requires the use of the winclass, winstyle, and winstylex parameters, which are otherwise not commonly needed.

The sample program GUILIN in EXLIB:[908,24] illustrates most of the combinations of these control types (see the sample screen shot below), all of which are created with variations of the following code:

MAP1 DWSTYLE,B,4

MAP1 NOSTATUS$,S,1,""        ! dummy to eliminate need for returned status

. . .

CREATE'STATIC:

xcall AUI, AUI_CONTROL, CTLOP_ADD, 0, "", 0, 0, "", "", NOSTATUS$, SROW, SCOL, EROW, ECOL, -2, -2, 0, 0, "", "", 0, "STATIC", DWSTYLE, 0

In this case, since we have no doubt about the operation succeeding, and do not care about the returned ctlids, we set the ctlid parameter to a literal 0 and use NOSTATUS$ for the cstatus parameter.

The different styles of lines and boxes are accomplished by setting DWSTYLE to one of the following values (defined in ashell.def):

Symbol

Value

Description

SS_BLACKRECT

4

Black rectangle.

SS_GRAYRECT

5

Gray rectangle.

SS_WHITERECT

6

White rectangle.

SS_BLACKFRAME

7

Black frame.

SS_GRAYFRAME

8

Gray frame.

SS_WHITEFRAME

9

White frame.

SS_SUNKEN

&h1000

Sunken.

SS_ETCHEDFRAME

12

Etched frame.

See the Virtual Key Symbolic Names table for conversion data.

 

The second set (with the "sunken" look) is accomplished by adding SS’SUNKEN to one of the above:

ashref_img99

Note that MBF_ALTPOS can be used with horizontal line controls to shift their position from the middle of the cell to the bottom of the cell. Millirows can also be used for finer adjustments; see the GUILIN sample for details.