Relating data to a Marked Text Field

Technical Articles > Marked Text Fields

For each marked text field Text Control can store any data that can be set with the FieldData property. For example when a Text Control is used to show the contents of a database a marked text field can be created for each database field. The database's field names can then be related to the Text Control's marked text fields using the FieldData property.

Other parts of the program can use the FieldData property to retrieve the name of the database field to which a marked text field is linked. For example when the user has clicked on a marked text field, the FieldData property can be used with the field identifier, which has been specified through the FieldClicked event. The property then retrieves the name of the database field the user has clicked on.

The FieldData property accepts strings and numbers. When a marked text field is copied via the clipboard or saved to a file the data belonging to the field is also copied or saved. The usage of the FieldData property does not change the current text contents of a marked text field. When new data is set, all previously set data is overwritten independently of the kind of data involved.