[Overview][Constants][Types][Classes][Procedures and functions][Index] Reference for unit 'StdCtrls' (#lcl)

TCustomEdit.Text

The text displayed and edited for the control.

Declaration

Source position: stdctrls.pp line 877

public property TCustomEdit.Text : TCaption;

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

TCustomEdit.TextChanged

  

Applies case conversion (if needed), and updates the editing cursor selection text.

TCustomEdit.CharCase

  

Controls the character case applied to values entered in the control.

TCustomEdit.TextHint

  

Default hint text shown when the Text property is empty for the control.

TCustomEdit.RealGetText

  

Uses the TextHint display status when getting the value for Text.

TCustomEdit.RealSetText

  

Updates Modified and the TextHint display when storing the new Text value.

TControl.Text

  

String with the text or caption for the control.


Version 3.2 Generated 2024-02-25 Home