tsc_StringField
This is a form field control based on tsc_Control. The tsc_StringField also forms the basis of many of the input fields such as tsc_AzimuthField, which is still basically a string field but the formatting and parsing of the field's text will be according to the rules for an angle displayed as an azimuth.
It displays a prompt and a single-line text-entry box.
When set to read-only, this field becomes much like a static label.
As can be seen in the Start station field in the image to the right, all edit boxes come with a small context menu button which pops up a menu of tools appropriate to the field type.
Public methods
See tsc_Control for base methods that apply to all controls and fields.
tsc_StringField (x_Code prompt, const char* text, int maxCharacters = -1);
The constructor supplies an x-code for the prompt text which also serves as a field identifier, the initial text to be displayed, and the maximum number of characters the user may enter into the field. A maximum length of -1 means no limit is enforced.
tsc_String Value () const;
void Value (const char* newText);
These two methods allow the control's content to be queried or modified.
virtual void AllowEmpty (bool allowEmpty);
virtual bool EmptyAllowed () const;
This methods control whether the user can set the contents to empty/NULL values.