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

# TCompositeCellEditor

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

Implements a composite cell editor with combines one or more of the predefined cell editors types.

## Declaration

Source position: grids.pas line 307

`type TCompositeCellEditor = class(TCustomControl)`
`protected`
`function DoUTF8KeyPress(); override;` |  | Performs actions to handle a key press events for a UTF-8-encoded character.
`procedure msg_GetValue(); message;` |  | Handles the message used to store the coordinates and text for the cell editor to the specified grid message.
`procedure msg_SetGrid(); message;` |  | Handles the message used to store the associated grid and options for the cell editor.
`procedure msg_SetValue(); message;` |  | Handles the message used to set the Text and caret position in the composite cell editor.
`procedure msg_SetBounds(); message;` |  | Handles the message which sets the bounds for the cell rectangle in the cell editor.
`procedure msg_SetMask(); message;` |  | Handles the message used to set the EditMask for the cell editor.
`procedure msg_SelectAll(); message;` |  | Calls the SelectAll method when the GM_SELCTALL message is received.
`procedure CMControlChange(); message;` |  | Handles the CM_CONTROLCHANGE control message for the composite editor.
`procedure msg_SetPos(); message;` |  | Stores the column and row numbers from the specified message to the cell editor.
`procedure msg_GetGrid(); message;` |  | Handles the message used to store the grid control and editor options in the specified grid message.
`function GetActiveControl;` |  | Gets the value for the ActiveControl property.
`procedure VisibleChanging; override;` |  | Hides or displays editor controls when the value for the Visible property is changed.
`function SendChar();` |  | Sends the specified character to the active control and returns an integer status result.
`procedure SetColor(); override;` |  | Sets the value for the Color property.
`procedure WndProc(); override;` |  | Implements message processing for the composite cell editor.
`procedure CustomAlignPosition(); override;` |  | Sets the position for the editor in the composite control.
`public`
`destructor Destroy; override;` |  | Destructor for the class instance.
`procedure AddEditor();` |  | Adds the specified control to the composite cell editor using the given alignment and active state.
`procedure SetFocus; override;` |  | Focuses the active control for the composite editor when it is Visible.
`function Focused; override;` |  | Indicates if the composite cell editor and one of its editor controls are focused.
`property MaxLength: Integer; [rw]` |  | Maximum length for the value in the composite editor control.
`property ActiveControl: TWinControl; [r]` |  | Contains the active editor control for the composite cell editor.
`end;`

## Inheritance

`TCompositeCellEditor` |  | Implements a composite cell editor with combines one or more of the predefined cell editors types.
`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

TCompositeCellEditor is a TCustomControl descendant which implements a cell editor composed of one or more of the cell editor types, such as:

- TStringCellEditor
- TButtonCellEditor

Editor controls of a specific type can be added to the class instance using the AddEditor method.

Use MaxLength to set the maximum number of characters allowed in the editor control derived from TCustomEdit in the composite editor.

Use ActiveControl to access the editor which is the focused control for the composite cell editor.

TCompositeCellEditor is the type used to implement the string cell editor in TCustomGrid / TGrid which includes a button to signal the OnEditButtonClick event for the grid control.

## See also

TCompositeCellEditor.MaxLength |  | Maximum length for the value in the composite editor control.
TCompositeCellEditor.ActiveControl |  | Contains the active editor control for the composite cell editor.
TCompositeCellEditor.AddEditor |  | Adds the specified control to the composite cell editor using the given alignment and active state.
TCustomGrid.OnEditButtonClick |  | Event handler signalled when the button in a cell Editor is clicked. Deprecated.
TStringCellEditor |  | Implements the default editor for cells in TCustomGrid.
TButtonCellEditor |  | The editor used for button-style cells in a grid.
TCustomControl |  | The base class for windowed controls which paint themselves.