Vcl.Controls.TControl.WindowText

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property WindowText: PChar read FText write FText;

C++

__property System::WideChar * WindowText = {read=FText, write=FText};

Properties

Type Visibility Source Unit Parent
property protected
Vcl.Controls.pas
Vcl.Controls.hpp
Vcl.Controls TControl

Description

Specifies the text string of the control.

Use WindowText to specify the text associated with the control. When setting WindowText, the control frees the memory associated with the previous value of WindowText before assigning a new value. Any memory associated with WindowText is freed when the control is destroyed. By default, WindowText is the same string as the Text property. Descendants of TControl can override the Text property to implement a different value.

For an edit box, the WindowText is the content of the control. For a combo box, the text string is the content of the edit box part of the combo box. For a button, the string is the button name. For all other controls, the string is the window title.

See Also