CabMasterPro User Guide
In This Topic
    Textboxes Tool Formula Reference
    In This Topic
    Line Style DimSet Tool Formula ReferenceLabelsFormula References for Drawing ToolsText Tool Formula ReferenceTextboxes Tool Formula ReferenceTextboxes Tool Formula ReferenceTextboxes Tool Formula ReferenceLabels 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 Textboxes under Drawing Tools.


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

    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

    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)