RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TControl.WindowText Property

Contains the text string of the control.

Pascal
property WindowText: PChar;
C++
__property const char * WindowText;

Use WindowText to determine 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. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!