The Dynamic Label is a control who’s label text can be set by commands from a connected device.
Name | Access | Type | Method | Description |
---|---|---|---|---|
AutoSize | Design-only | bool | – | The label is resized automatically to fit its current value |
Name | Read only | string | – | The name of the control. |
Text | Read/write | string | SetText | The current value of the text label. |
TextAlign | Design-only | HorizontalAlignment | – | Sets the position of the text within the control rectangle |
TextLength | Read only | int | – | Gets the length of the label text. |
This control also supports all the common control properties and the following methods, which can be used when creating serial commands.
Name | Returns | Description |
---|---|---|
FixedLengthText(int Length) | string | Returns the first Length characters from the label value. If the value is shorter than Length spaces (‘ ‘) will be added to the end until it is exactly Length characters long. |
FixedLengthText(int Length, string Alignment) | string | Returns the first Length characters from the label value. If the value is shorter than Length spaces (‘ ‘) will be added to the value until it is exactly Length characters long. Spaces are added to the start or end of the value when Alignment is Right or Left . If Alignment is Center an equal number of spaces is added to the start and end of the value. |
FixedLengthText(int Length, string Alignment, char Padding) | string | Returns the first Length characters from the label value. If the value is shorter than Length the Padding character will be added to the value until it is exactly Length characters long. The Padding character is added to the start or end of the value when Alignment is Right or Left . If Alignment is Center an equal number of Padding characters is added to the start and end of the value |