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 to look up the reference in the table below.
To find out what this property page is used for, see the Label page under Cabinet Properties.
Ref | Variable Name |
---|---|
1 | Type |
2 | Subtype |
3 | Code |
4 | Desc or Comment |
5 | Font (see Note 2 below) |
6 | Text |
7 | ShowLabel |
8 | LabelAngle |
9 | vOffset |
10 | hOffset |
11 | LabelPos (see Note 3 below) |
12 | Align (see Note 3 below) |
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.
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
When placing tiles, the placement origin can be offset using the 9-way placement buttons.
Middleware formula constants for alignment and positioning can be used instead of needing to use magic numbers for LabelPos and Align.
Predefined constants are as follows.
leftedge centerline rightedge frontedge middledepth backedge frontleft frontcenter frontright middleleft middlecenter middleright backleft backcenter backright
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)
Where middleware variables are defined, in many places these names are also used in the import/export of the properties with those names.
Alignment and Justification magic numbers
Formula control of the Alignment and Justification options using magic numbers is still available.
Doing this is a little harder that normal, but having to do this is uncommon.
Both sets of options are controlled together, you cannot just control one and leave the other editable. Each option is controlled by a constant number, and you add these constants to control both at once.
The numbers for the Justification controls are:
Left = 1, Right = 2, Centre = 3.
For the Alignment controls, they are:
Above = 4, Below = 8, Centre = 12.
So to set a label to be right-aligned and below the attachment point, we would add 2 and 8 to give 10 and enter that in the formula box.
Or just type "2 + 8" to make it obvious where those numbers come from.