BEVEL (set 3-D effect border)

Top  Previous  Next

 

BEVEL( outer [,inner] [,style] )

BEVEL

Specifies a 3-D effect border on a control.

outer

An integer constant or constant expression that specifies the width of the outer edge of the bevel (PROP:BevelOuter, equivalent to {PROP:Bevel,1}). If negative, the outer edge appears to be lowered; if positive, the outer edge appears to be raised.

inner

An integer constant or constant expression that specifies the width of the inner edge of the bevel (PROP:BevelInner, equivalent to {PROP:Bevel,2}). If negative, the inner edge appears to be lowered; if positive, the inner edge appears to be raised. If omitted, there is no inner edge to the border.

style

An integer constant or constant expression that specifies fine control of the bevel, overriding the signs of the outer and inner parameters (PROP:BevelStyle, equivalent to {PROP:Bevel,3}).

The BEVEL attribute (PROP:BEVEL) of a PANEL, OPTION, GROUP, or REGION control specifies a 3-D effect border. The signs of the outer and inner parameters determine whether the control appears to be raised or lowered. The style parameter allows fine control of the bevel. This parameter is a bitmap with the bits apportioned for each edge as follows:

Bits:   15 - 12 | 11 - 08 | 07 - 04 | 03 - 00

Edge:     left  |   top   |   right |  bottom

Each of these four-bit nibbles is further divided into two two-bit sections that govern the appearance of the inner and outer parts of the edge. The low order two bits of each nibble defines the outer part, while the high order bits define the inner:

Binary:   00b   | 01b    | 10b     | 11b

Result: no edge | raised | lowered | gray

Combining these into nibbles creates the definition of one edge of the bevel:

0110b  =   raised inner, lowered outer

1001b  =   lowered inner, raised outer

Example:

Win1 WINDOW,AT(0,0,160,400)

     PANEL,AT(25,15,50,50),USE(?Panel1),BEVEL(5,-5) !Raised outer, lowered inner

     PANEL,AT(0,0,,),USE(?Panel2),FULL,BEVEL(2,2,1111010110101001b)

                    !left   = all gray

                    !top    = inner raised, outer raised

                    !right  = inner lowered, outer lowered

                    !bottom = inner lowered, outer raised

     REGION,AT(0,80,5,),USE(?ResizeBar),FULL,IMM,BEVEL(2,2,0101000010100000b)

                    !A vertical resize bar

    END