A text box provides a control where the user can enter text.

Event Action Properties

The text box control exposes one event action property: OnTextChangedSend. Any message set on this property will be sent whenever the content of the text box is changed.

Message Expression Properties

The text box control exposes the following properties for use in serial messages:

  • Name (String): the name of the control [read-only]
  • Text (String): the content of the text box [read/write]
  • TextLength (Integer): the number of characters in the text box [read-only]

Message Expression Methods

The text box control exposes the following methods for use in serial messages:

  • FixedTextLength(Length)
  • FixedTextLength(Length, Alignment)
  • FixedTextLength(Length, Alignment, Padding)

String FixedTextLength(int Length)

Returns exactly Length characters adding spaces if the content of the text box is shorter than Length. If the content of the text box is greater then Length, it is truncated.

String FixedTextLength(int Length, string Alignment)

Returns exactly Length characters, truncating the content of the text box if it contains more than Length characters. If the text box contains fewer than Length characters it is padded with spaces to make up the required length. Alignment may be one of Left, Right, Centre or Center to indicate whether padding characters, if required, should be added to left, right or center justify the text.

String FixedTextLength(int Length, string Alignment, char Padding)

Returns exactly Length characters, truncating the content of the text box if it contains more than Length characters. If the text box contains fewer than Length characters it is padded with Padding characters to make up the required length. Alignment may be one of Left, Right, Centre or Center to indicate whether padding characters, if required, should be added to left, right or center justify the text.

Recent Posts

Leave a Comment

Start typing and press Enter to search