CabMasterPro User Guide
In This Topic
    Labels Tool Formula Reference
    In This Topic
    LabelsFormula References for Drawing ToolsLabelsLabelsLabelsLabelsLabelsLabels Tool

    Any controls on this page which can be accessed with a formula are marked with a reference number.

    To view the formula name, hold your mouse over the control or click on  the control to look up the reference in the table below.

    For more information on other pages or categories, simply click on the area of interest.

    To find out what this property page is used for, see discussion on Labels under Drawing Tools.

    Ref Variable Name
    1 Desc
    2 Text
    3 LabelAngle
    4 Font (see Note 2 below)
    5 Align (see Note 2 below)

     

    Note 1

    TextColor

    Color can be accessed by this formula directly. It is returned as an integer in the same format as the Colour Constants.

    Color can also be accessed and controlled as a member of the Font map, with key color - see Note 2.

    Note 2

    Font

    Font is a property which is a map type with these keys:

    Ref Variable Name Example
    “font” Name of font “Arial”
    “size” Font height in logical units 5
    “bold” Is Bold Yes
    “italic” Is Italic No
    “underline” Is Underlined Yes
    “strikeout” Is Strikeout No
    “weight” Weight of font in range 0 to 1000 400 is normal, 700 is bold, 0 to use default
    “charset” Character set GREEK_CHARSET etc, lookup system constants
    “color” Color for text RGB(255,0,0) for red, etc

    Align

    Middleware formula constants for alignment can be used instead of needing to use magic numbers.

    Predefined constants are as follows.

    alignleft aligncenter alignright
    alignbottom alignbaseline aligntop

    Examples

    SetValue supports "alignh" and "alignv" to set alignment on one axis (h or v) without affecting other axis (v or h)

    • SetValue("alignh", alignleft) just changes left-right alignment without altering top-bottom alignment

    Also supports the following to edit both together

    • SetValue("align", alignleft+alignbottom)

    Note 3

    The variable Font is a map containing the main details of the font, with these keys recognized in the map… [as above font map definition], thereby providing the ability to control the font, size etc via a map formula.

    The label font is a full formula-controlled attribute which allows formulas with defaults set at Drawing level or page level if desired

    Click to download the Label Font Test file shown above.

    Define Questions

     



    See Also