Previous Topic

Next Topic

Inhoudsopgave

Book Index

TDBText Control

TDBText

Description

Represents a data-aware control that displays the value of a field on a form.

Remarks

Use TDBText to display the contents of a field in the current record of a dataset on a form. Field values displayed by database text controls cannot be modified by the user using the text control. To allow the user to edit the field value, use TDBEdit or TDBMemo instead.

If the application does not require the data-aware capabilities of TDBText, use the label component (TLabel) instead.

TDBText Properties

Property Property AutoSize: String (R/W)

Determines whether the database text control automatically resizes to the width and length of the current string. Use AutoSize to make the database text control adjust its size automatically so the client area accommodates the height and width of the field value. When AutoSize is false (the default), the control is fixed in size. When AutoSize is true, the size of the control is readjusted whenever its caption changes. The size of the control is also readjusted when the Font property changes. When WordWrap is true, the width of the database text control is fixed. If AutoSize is also true, changes to the field value cause the control to change in height. When AutoSize is true and WordWrap is false, the height of the control is determined by the font, and changes to the field value cause the control to change in width.

General Data-Aware Control Properties

Property Property DataField: String (R/W)

Property Property DataSource: TDataSource (R/W)

Property Property ReadOnly: Boolean (R/W)