Skip to main content
A newer version of this page is available. .

TcxCustomEdit Class

Serves as the base class for all editor classes.

Declaration

TcxCustomEdit = class(
    TcxCustomEditContainer,
    IcxEditRepositoryItemListener,
    IcxInplaceEditIMEHelper,
    IdxSkinSupport,
    IdxSpellCheckerControl,
    IdxFadingObject,
    IcxEditOwner,
    IdxTouchModeSupport
)

Remarks

This class implements the basic functionality for all editors. Most of them (except for image editors and check box controls) create an inner editor, inside which an end-user manipulates an edit value. The inner editor is placed within a container which implements border drawing. To access the inner editor directly use the InnerEdit property, though it is not a usual practice.

Edit values are set via the EditValue property. The main members of TcxCustomEdit are Properties and Style, StyleDisabled, StyleFocused and StyleHot properties. Properties store main attributes specific to the editor. The styles control the look & feel of the editor (its background, border color, border style, font and many others) in various editor states. The Styles property provides indexed access to these styles.

The TcxCustomEdit class introduces the Transparent property which controls the transparency state of an editor’s background. Descendants of the TcxCustomEdit class publish this property if required for each specific editor.

Editors derived from the TcxCustomEdit class can work in two modes: standalone and in-place. In-place editors allow you to embed them in other controls. For instance, you can edit a cell value in a grid control using an in-place editor. To create an in-place editor you should call the constructor and pass True as an AIsInplace argument. In-place editors are drawn without a border. The AutoSize property of in-place editors always returns False. In-place editors cannot be used as data-aware controls by connecting directly to the data storage.

Do not create instances of the TcxCustomEdit class. Use TcxCustomEdit descendants, which fully implement specific editors. These editors can be bound to data storage. In this instance, the editor displays a value from a specific field of this data storage and also can post the modified value back. The connection with the data storage is organized by the DataBinding object. Data binding is not implemented in non data-aware editors.

You can override some methods of the TcxCustomEdit class to create custom editors.

See Also