Sign in Join
FPDoc Onlineexperiment

TCustomEdit.Text property

Member of TCustomEditpublicIn unit StdCtrls

The text displayed and edited for the control.

Declaration

pascal
property Text:;

Description

Text is a TCaption property which contains the UTF-8-encoded characters maintained as the value for the edit control. The property value can be assigned at design-time using the Object Inspector in the Lazarus IDE, or at run-time in program code. For example:

Edit1.Text := 'Volts DC';
ShowMessage('Unit Measure = ' + Edit1.Text);

The value in Text is read and written using the RealGetText and RealSetText methods. Not only do they provide code compatibility with the Delphi VCL, they support use of emulated TextHint displays. The value in TextHint is temporarily assigned to Text when an inline hint is displayed for the control.

The value in Text may be altered in the TextChanged method when the setting in CharCase requires case conversion for the value in the control.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.