Dynamic Label

The Dynamic Label is a control who’s label text can be set by commands from a connected device.

Design-time Properties for the Dynamic Label control
PropertyDescription
TextThe current value of the text displayed
TextAlignSets the position of the text within the control rectangle
AutoSizeThe label is resized automatically to fit its current value
Run-time Properties for the Dynamic Label control
NameAccessTypeDescription
NameRead onlystringThe name of the control
TextRead/writestringThe current value of the text label
TextLengthRead onlyintGets the length of the label text
Run-time Methods for the Dynamic Label control
NameReturnsDescription
FixedLengthText(int Length)stringReturns 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)stringReturns 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)stringReturns 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
Run-time properties common to most controls
PropertyAccessTypeDescription
VisibleRead/writeboolHide/show the control
EnabledRead/writeboolEnable/disable the control. When a control is disabled it is visible but shown grayed out and you can't interact with it.
ForeColorRead/writestringAdjust the foreground color
BackColorRead/writestringAdjust the background color
Recent Posts

Leave a Comment

Start typing and press Enter to search