[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
Caption - the text-string appearing on the Control, usually used to identify its function
Source position: controls.pp line 1379
public property TControl.Caption: TCaption |
Gets caption as a text-string (GetText), or stores the new caption (SetText). Shows flag if caption is stored (IsCaptionStored).
By default, the Caption appears the same as the control Name in the Object Inspector, and the developer needs to set it explicitly to some new text.
The VCL implementation relies on the virtual Get/SetTextBuf to exchange text between widgets and VCL. This means a lot of (unnecesary) text copies.
The LCL uses strings for exchanging text (more efficient). To maintain VCL compatibility, the virtual RealGet/SetText is introduced. These functions interface with the LCLInterface.
The default Get/SetTextBuf implementation calls the RealGet/SetText. As long as the Get/SetTextBuf isn't overridden Get/SetText calls RealGet/SetText to avoid PChar copying.
To keep things optimal, LCL implementations should always override RealGet/SetText. Get/SetTextBuf is only kept for compatibility.
|
Function to get a text-string associated with the control |
|
|
Procedure to store text associated with the control in a string |
lazarus-ccr.sourceforge.net |