Label
The Label View is very similar to the , but is displayed as static text and is not directly editable.
This is useful for developing advanced configuration/control panels.
The label text is processed to replace $[Units Name] with the units of the specified user Units (e.g. '$[Load Units]' might become kPa, and '$[Speed Units]' might become mph, depending on the user units selection).
If you need to display something beginning with '$[' then start it with a double sigil, '$$'. Any double sigil will be converted to a single character.
When accessed via scripts, the label text can be accessed by the 'text' property:
var label = window.findViewByID("my_label");
print(label.text);
label.text = "Bingo";View Properties
Properties editable via the properties editor.
| Property | Script ID | Description |
|---|---|---|
| Label | label |
Sets the label text. |
| Drag Target | drag_target |
Enables mouse-dragging of the label to adjust the value of another view, specified using its 'script ID'. |
| Title | title |
The title of the window. |
| Script ID | id |
The scripting ID of the window. Can be used as an alternative to the title for searching for windows from scripts. |
| Tool Tip | tooltip |
Window tool tip. |
| Text | text |
Sets the label text. |
| Icon | icon |
Sets the icon. |
| Padding X | padding_x |
Padding in the horizontal (x) direction |
| Padding Y | padding_y |
Padding in the vertical (y) direction |
| Align Horizontal | text_align |
Text alignment in the horizontal (x) direction |
| Align Vertical | text_valign |
Text alignment in the vertical (y) direction |
| Font Size | font_size |
Size of the text. |
| Bold Font | font_bold |
Enable bold/normal text. |
| Word Wrap | word_wrap |
Enable word wrapping. |
| Divider Line | divider_line |
Enable display of divider line (s). |