ANCHOR Property


8.7A, PLBCMP GUI Only

square.png Objects

 

The ANCHOR property ties an object to one or more edges of its parent object. This ensures that the anchored edges remain in the same position when it is resized relative to the edges of the parent container. The property uses the following format:

 

ANCHOR={value}

Note the following:

  1. ANCHOR may be used in CREATE, SETPROP, or GETPROP statements.

  2. By default, objects are anchored to the top/left.

  3. A parent object may be a PLFORM or a PANEL and is specified during the object's CREATE statement. This is accomplished in the designer by drawing the object on the form or a PANEL object.

  4. {value} is a decimal number, a Numeric Variable, an Expression, or a keyword as defined in PLBEQU.INC. The supported values and keywords are:
     

  5. Keyword

    Value

    Position

    $ANCHORBL

    1

    Bottom, Left

    $ANCHORBLR

    2

    Bottom, Left/Right

    $ANCHORBR

    3

    Bottom, Right

    $ANCHORTBL

    4

    Top/Bottom, Left

    $ANCHORTBLR

    5

    Top/Bottom, Left/Right

    $ANCHORTBR

    6

    Top/Bottom, Right

    $ANCHORTL

    7

    Top, Left

    $ANCHORTLR

    8

    Top, Left/Right

    $ANCHORTR

    9

    Top, Right

 

See Also: Object Properties, Object IO Instructions, Object Definitions



PL/B Language Reference ALTTEXT Property ANGLE Property