[Overview][Types][Classes][Index] | Reference for unit 'GroupedEdit' (#lcl)

# TCustomAbstractGroupedEdit

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Implements a grouped edit control.

## Declaration

Source position: groupededit.pp line 62

`type TCustomAbstractGroupedEdit = class(TCustomControl)`
`protected`
`class procedure WSRegisterClass; override;` |  | Registers the widget set class used to create new instances of the grouped edit.
`procedure CalculatePreferredSize(); override;` |  | Calculates the preferred size for the control with optional space reserved by theme services.
`function CreateBuddy; virtual;` |  | Creates the TControl instance assigned to the Buddy property.
`function CreateEditor; virtual;` |  | Creates the TGEEdit instance used in the BaseEditor property.
`procedure FocusAndMaybeSelectAll;` |  | Gives focus to the control, and optionally selects text in its editor.
`function GetEditorClassType; virtual;` |  | Gets the class reference used to create the BaseEditor for the control.
`function GetBuddyClassType; virtual; abstract;` |  | Gets the class reference used to create the Buddy for the control.
`class function GetControlClassDefaultSize; override;` |  | Gets the default size for new instances of the control.
`procedure SetDirectInput(); virtual;` |  | Sets the value for the DirectInput property.
`function RealGetText; override;` |  | Gets the value for the text in the control.
`procedure RealSetText(); override;` |  | Sets the value for the text in the control.
`function GetEditPopupMenu;` |  | Gets the popup menu for the BaseEditor in the control.
`function GetBuddyCaption;` |  | Gets the Caption used in the Buddy property.
`function GetBuddyCursor;` |  | Gets the value for the BuddyCursor property.
`function GetBuddyHint;` |  | Gets the value for the BuddyHint property.
`function GetBuddyWidth;` |  | Gets the value for the BuddyWidth property.
`function GetBuddyVisible;` |  | Gets the Visible property for the Buddy control.
`procedure SetBuddyCaption();` |  | Sets the Caption used in the Buddy property.
`procedure SetBuddyCursor();` |  | Sets the cursor shape used in the Buddy property.
`procedure SetBuddyHint();` |  | Sets the Hint displayed for the Buddy property.
`procedure SetBuddyWidth();` |  | Sets the Width used for the Buddy property.
`procedure SetBuddyVisible();` |  | Sets the value for the Visible property in the Buddy control.
`procedure BuddyClick; virtual;` |  | Performs actions needed when the Buddy control is clicked.
`procedure DoEnter; override;` |  | Performs actions needed when the control is entered.
`procedure EditChange; virtual;` |  | Signals the OnEditChange event handler, when assigned.
`procedure EditClick; virtual;` |  | Signals the internal OnEditClick event handler, when assigned.
`procedure EditContextPopup(); virtual;` |  | Signals the OnContextPopup event handler (when assigned).
`procedure EditDblClick; virtual;` |  | Signals the OnDblClick event handler (when assigned).
`procedure EditDragDrop(); virtual;` |  | Signals the OnDragDrop event handler (when assigned).
`procedure EditDragOver(); virtual;` |  | Signals the OnDragOver event handler (when assigned).
`procedure EditEditingDone; virtual;` |  | Signals the OnEditEditingDone event handler (when assigned).
`procedure EditEndDrag(); virtual;` |  | Signals the OnEditEndDrag event handler (when assigned).
`procedure EditEnter; virtual;` |  | Signals the OnEnter event handler (when assigned).
`procedure EditExit; virtual;` |  | Signals the OnExit event handler (when assigned).
`procedure EditKeyDown(); virtual;` |  | Signals the OnKeyDown event handler (when assigned).
`procedure EditKeyPress(); virtual;` |  | Signals the OnKeyPress event handler (when assigned).
`procedure EditKeyUp(); virtual;` |  | Signals the OnKeyUp event handler (when assigned).
`procedure EditMouseDown(); virtual;` |  | Signals the OnMouseDown event handler (when assigned).
`procedure EditMouseUp(); virtual;` |  | Signals the OnMouseUp event handler (when assigned).
`procedure EditMouseEnter; virtual;` |  | Signals the OnMouseEnter event handler (when assigned).
`procedure EditMouseLeave; virtual;` |  | Signals the OnMouseLeave event handler (when assigned).
`procedure EditMouseMove(); virtual;` |  | Signals the OnMouseMove event handler (when assigned).
`procedure EditMouseWheel();` |  | Signals the OnMouseWheel event handler (when assigned).
`procedure EditMouseWheelUp(); virtual;` |  | Signals the OnMouseWheelUp event handler (when assigned).
`procedure EditMouseWheelDown(); virtual;` |  | Signals the OnMouseWheelDown event handler (when assigned).
`procedure EditUtf8KeyPress(); virtual;` |  | Signals the OnUtf8KeyPress event handler (when assigned).
`procedure EditStartDrag(); virtual;` |  | Signals the OnStartDrag event handler (when assigned).
`procedure UpdateSpacing;` |  | Updates border spacing in BaseEditor for the Layout and visibility of the Buddy control.
`procedure CheckCursor;` |  | Forwards a CheckCursor method call to the BaseEditor for the control.
`procedure CMParentColorChanged(); message;` |  | Handles the control message received when the ParentColor property is changed.
`function EditCanModify; virtual;` |  | Indicates if BaseEditor can be modified.
`procedure GetSel();` |  | Gets the offsets for the current text selection in the control.
`function GetSpacing; virtual;` |  | Gets the value for the Spacing property.
`procedure SetSel();` |  | Sets the current text selection in the control.
`procedure Loaded; override;` |  | Performs actions when the control has finished loading in the LCL streaming mechanism.
`procedure Reset; virtual;` |  | Forwards a Reset method call to the BaseEditor in the control.
`procedure SetAutoSize(); override;` |  | Sets the value for the AutoSize property.
`procedure SetColor();` |  | Sets the value for the Color property.
`procedure SetCursor(); override;` |  | Sets the value for the Cursor property.
`procedure ShouldAutoAdjust(); override;` |  | Indicates if the height or width is affected during auto-adjust.
`property AutoSelect: Boolean; [rw]` |  | Indicates if the text in the control is automatically selected when focus is received.
`property AutoSelected: Boolean; [rw]` |  | Indicates if the current text selection was performed automatically.
`property Buddy: TControl; [r]` |  | Represents the associated TControl instance in the grouped edit control.
`property BuddyCaption: TCaption; [rw]` |  | Caption used for the Buddy control.
`property BuddyCursor: TCursor; [rw]` |  | Cursor shape used for the Buddy control.
`property BuddyHint: TTranslateString; [rw]` |  | Hint displayed for the Buddy control.
`property BuddyWidth: Integer; [rw]` |  | Width for the Buddy control.
`property DirectInput: Boolean; [rw]` |  | Indicates if text can be entered directly into the BaseEditor control.
`property BaseEditor: TGEEdit; [r]` |  | Represents the control used as the editor for the value in the grouped edit control.
`property EditMask: string; [rw]` |  | Contains the masking characters used in the editor for the control.
`property EditText: string; [rw]` |  | Contains the value entered in the control including masking characters.
`property FocusOnBuddyClick: Boolean; [rw]` |  | Determines if the control receives focus when the Buddy control is clicked.
`property IsMasked: Boolean; [r]` |  | Indicates if an edit mask is in use in the BaseEditor in the grouped edit control.
`property Layout: TLeftRight; [rw]` |  | Controls the alignment of the edit control and its associate.
`property Spacing: Integer; [rw]` |  | Spacing used between the BaseEditor and the Buddy controls.
`property OnBuddyClick: TNotifyEvent; [rw]` |  | Event handler signalled when the Buddy control is clicked.
`public`
`constructor Create(); override;` |  | Constructor for the class instance.
`destructor Destroy; override;` |  | Destructor for the class instance.
`procedure SetFocus; override;` |  | Sets the focus to the editor in the control.
`function Focused; override;` |  | Performs actions needed when the control receives focus.
`procedure Clear;` |  | Removes the text content in the control.
`procedure ClearSelection; virtual;` |  | Clears the content for the current selection in the control.
`procedure CopyToClipboard; virtual;` |  | Copies the content in the control to the clipboard.
`procedure CutToClipboard; virtual;` |  | Copies content in the control to the clipboard, and removes it from the control.
`procedure PasteFromClipboard; virtual;` |  | Pastes content into the control from the clipboard.
`procedure SelectAll;` |  | Selects all of the content in the control.
`procedure Undo; virtual;` |  | Reverses the last edit performed on the control value.
`procedure ValidateEdit; virtual;` |  | Performs actions needed to validate the value for the control.
`property Autosize: Boolean;` |  | Allows automatic adjustment of the size for the control, according to its content.
`property AutoSizeHeightIsEditHeight: Boolean; [rw]` |  | Indicates if the height for BaseEditor is used as the height for the control when auto-sizing.
`property Alignment: TAlignment; [rw]` |  | Indicates the text alignment used for the control value.
`property CanUndo: Boolean; [r]` |  | Indicates if the Undo method can used to revert changes to the control value.
`property CaretPos: TPoint; [rw]` |  | Position of the editing caret in the control.
`property CharCase: TEditCharCase; [rw]` |  | Controls the case conversion used for a value entered in the control.
`property Color: TColor; [rws]` |  | Background color for the BaseEditor on the control.
`property ParentColor: Boolean; [rw]` |  | Indicates if the color in the Parent control is used.
`property EchoMode: TEchoMode; [rw]` |  | Indicates if characters entered in the control value are hidden, displayed, or obscured.
`property HideSelection: Boolean; [rw]` |  | Hides the current text selection when the control loses focus.
`property MaxLength: Integer; [rw]` |  | Maximum number of characters allowed in the editor for the control.
`property Modified: Boolean; [rw]` |  | Indicates if the value for the control has been changed by the user.
`property NumbersOnly: Boolean; [rw]` |  | Indicates if the edit control accepts numeric values only.
`property PasswordChar: Char; [rw]` |  | Contains the character displayed to obfuscate the text on the control when a value is entered or displayed.
`property PopupMenu: TPopupMenu; [rw]` |  | PopupMenu for the control.
`property ReadOnly: Boolean; [rw]` |  | Indicates whether the value for the control can be changed.
`property SelLength: Integer; [rw]` |  | Number of characters in the current selection for the control.
`property SelStart: Integer; [rw]` |  | Starting position for the current selection in the control.
`property SelText: string; [rw]` |  | Returns the selected text in the control.
`property TabStop: Boolean; [rw]` |  | Indicates if the control can be reached using Tab navigation.
`property Text: TCaption;` |  | String with the text or caption for the control.
`property TextHint: TTranslateString; [rw]` |  | Default hint text shown when the Text property is empty for the grouped edit control.
`property OnChange: TNotifyEvent; [rw]` |  | Event handler signalled when the value for the control is changed.
`property OnClick: TNotifyEvent; [rw]` |  | Notification handler for mouse clicks.
`property OnContextPopup: TContextPopupEvent; [rw]` |  | Invoked when a context-sensitive pop-up menu is requested.
`property OnDblClick: TNotifyEvent; [rw]` |  | Event handler signalled when a mouse double click occurs in the control.
`property OnDragDrop: TDragDropEvent; [rw]` |  | Event handler signalled when an object is dropped onto the control.
`property OnDragOver: TDragOverEvent; [rw]` |  | Event handler signalled when a control is dragged over the control instance.
`property OnEditingDone: TNotifyEvent; [rw]` |  | Event handler signalled when editing is completed for the control.
`property OnEndDrag: TEndDragEvent; [rw]` |  | Event handler signalled for the end of a drag-drop operation.
`property OnEnter: TNotifyEvent; [rw]` |  | Event handler signalled when the control receives focus.
`property OnExit: TNotifyEvent; [rw]` |  | Event handler signalled when the control loses focus.
`property OnMouseDown: TMouseEvent; [rw]` |  | Event handler signalled when a mouse down event is handled for the control.
`property OnKeyPress: TKeyPressEvent; [rw]` |  | Event handler signalled for character data entered by the user.
`property OnKeyDown: TKeyEvent; [rw]` |  | Event handler signalled for key down keyboard events.
`property OnKeyUp: TKeyEvent; [rw]` |  | Event handler signalled when a key up event has occurred for the control.
`property OnMouseEnter: TNotifyEvent; [rw]` |  | Event handler signalled when the mouse pointer has entered the control.
`property OnMouseLeave: TNotifyEvent; [rw]` |  | Event handler signalled when the mouse pointer has left the control.
`property OnMouseMove: TMouseMoveEvent; [rw]` |  | Event handler signalled when the mouse pointer is moved in the control.
`property OnMouseWheel: TMouseWheelEvent; [rw]` |  | Event handler for mouse wheel turned.
`property OnMouseWheelUp: TMouseWheelUpDownEvent; [rw]` |  | Event handler signalled for an upward movement of the mouse wheel.
`property OnMouseWheelDown: TMouseWheelUpDownEvent; [rw]` |  | Event handler signalled for a downward movement of the mouse wheel.
`property OnMouseUp: TMouseEvent; [rw]` |  | Event handler signalled when a mouse up event is handled for the control.
`property OnStartDrag: TStartDragEvent; [rw]` |  | Event handler signalled for the start of a dragging operation.
`property OnUtf8KeyPress: TUTF8KeyPressEvent; [rw]` |  | Event handler signalled for UTF-8 key press events.
`end;`

## Inheritance

`TCustomAbstractGroupedEdit` |  | Implements a grouped edit control.
`TCustomControl` |  | The base class for windowed controls which paint themselves.
`TWinControl` |  | Implements a windowed control which can contain other child controls.
`TControl` |  | The base class for visible controls.
`TLCLComponent` |  | The base class for LCL components which have an associated widget.
`TComponent`
?
`TObject`

## Description

TCustomAbstractGroupedEdit is a TCustomControl descendant which implements a grouped edit control. TCustomAbstractGroupedEdit is composed of a TGEEdit control that provides an editor for the control value, and a related TControl descendant.

TCustomAbstractGroupedEdit basically acts as a container for the grouped controls, and ensures that Alignment and Anchoring are performed. TCustomAbstractGroupedEdit forwards relevant methods and properties to the BaseEditor or Buddy members, and receives event notifications from both.

Derived classes should implement their own BaseEditor and Buddy properties so that they will have the correct class types.

## See also

TCustomAbstractGroupedEdit.BaseEditor |  | Represents the control used as the editor for the value in the grouped edit control.
TCustomAbstractGroupedEdit.Buddy |  | Represents the associated TControl instance in the grouped edit control.
TGEEdit |  | Implements the edit control used in TCustomAbstractGroupedEdit.
TCustomControl |  | The base class for windowed controls which paint themselves.
TControl |  | The base class for visible controls.