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

TDBGroupBox.Caption

Text displayed as the caption for the control.

Declaration

Source position: dbctrls.pp line 1117

published property TDBGroupBox.Caption : TCaption;

Description

Gets caption as a text string (GetText), or stores the new caption (SetText). Sets an internal flag if the caption is stored (IsCaptionStored).

By default, the Caption is the same as the control Name in the Object Inspector. 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 (unnecessary) 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 RealGet/SetText. As long as the Get/SetTextBuf isn't overridden Get/SetText calls RealGet/SetText to avoid PChar copy operations.

For optimal usage, LCL implementations should always override RealGet/SetText. Get/SetTextBuf is only kept for compatibility.

See also

TControl.Caption

  

The text displayed for the control.


Version 4.0 Generated 2025-05-03 Home