Back to Devexpress

TcxCustomEdit Class

vcl-cxedit.md

latest20.9 KB
Original Source

TcxCustomEdit Class

The base class for all editor components.

Declaration

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

Remarks

The ExpressEditors Library ships with over 40 data editor types you can use as standalone controls for data input forms or in-place editors embedded into container controls (Data Grid, Tree List, Vertical Grid, Pivot Grid, Ribbon UI, etc.). An in-place editor exists (and, therefore, has its own WinAPI handle) only when a user activates it. Otherwise, the target container control displays a static editor image for resource usage optimization.

Most data editors (such as text, spin, or mask editors) are designed to display data in a specific manner and allow users to edit data. However, editors such as bar code or formatted label editors have no data edit functionality.

In this topic…

How to Use TcxCustomEdit

All DevExpress editors inherit the TcxCustomEdit class that implements base editor functionality. If you include any DevExpress editor (a terminal TcxCustomEdit descendant) in your project, you can use all public API members declared in the TcxCustomEdit class.

Note

Different DevExpress editors publish different sets of API members declared in the TcxCustomEdit class because each editor is designed for the corresponding usage scenario. For example, unbound editors do not publish data binding-related API members.

Refer to descriptions of individual editors listed in the following section: Terminal TcxCustomEdit Class Descendants.

Use TcxCustomEdit Independently

If you need to use the TcxCustomEdit class independently (for example, to implement custom TcxCustomEdit-based editors), add the cxEdit unit to the uses clause of your project (in Delphi) or include the cxEdit header in the source code file (in C++Builder).

Main API Members

The list below outlines key members of the TcxCustomEdit class that allow you to configure editors.

Appearance Settings

Style | StyleDisabled | StyleFocused | StyleHot | StyleReadOnly

Allow you to define individual appearance settings for different editor states.

Tip

To apply the same style settings to multiple editors, use a TcxEditStyleController component. If you need to apply the same style settings to all editors in your application, you can use a TcxDefaultEditStyleController component.

StylesProvides access to individual styles applied to the editor in different states.TransparentSpecifies if the editor is transparent in GDI render mode.

Content-Related APIs

CanSmartPasteIdentifies if the editor supports AI-powered Smart Paste operations.ClearClears the editor.CopyToClipboard | CutToClipboard | PasteFromClipboardAllow you to perform clipboard operations.EditValueSpecifies the edit value.OnEditingAllows you to prevent users from activating the editor.ResetEditValueRestores the previous edit value before the pending change is applied.SelectAllSelects editor content.ValidateEditValidates the display value.

Data-Related APIs

Note

Only data-aware editors publish these API members.

DataBindingAllows you to bind the editor to data.CanPostEditValueIdentifies if the data-aware editor can post its edit value to the bound data storage. Only data-aware editors publish this property.OnPostEditValueExecutes custom code when the editor posts its value to the bound data storage.PostEditValuePosts the edit value to the bound data storage.

Editor Settings and Repository Items

ActivePropertiesProvides access to the current editor settings regardless of their source. This property set does not allow you to customize editor settings.GetPropertiesClassReturns the actual editor settings type.PropertiesAllows you to customize editor settings directly if the editor does not have an assigned repository item.RepositoryItemSpecifies a repository item as an external source of editor settings. A repository item has priority over other editor settings.

General-Purpose API Members

AutoSizeSpecifies if the editor automatically adjusts its size to fit content.EnabledSpecifies if the editor is enabled.CanModifyIdentifies if the editor is in read-only mode.IsEditValidating | IsHiding | IsPostingAllow you to identify the current operation in the editor.ShowHintSpecifies if the standalone editor can display hints. To enable hints for an in-place editor in a container control, set its OptionsBehavior.CellHints[1] property to True.SupportsSpellingIdentifies if the editor supports the TdxSpellChecker component.Width | HeightAllow you to explicitly define editor dimensions.

Terminal TcxCustomEdit Class Descendants

Terminal TcxCustomEdit class descendants include all unbound and data-aware editors shipped with the ExpressEditors Library. Do not create TcxCustomEdit class instances. You can derive descendants from the TcxCustomEdit class and override its virtual methods to create custom editors with support for DevExpress Skins and editor integration mechanisms.

Note

Non-editor controls shipped with the ExpressEditors Library are not derived from the TcxCustomEdit class. For example, TcxButton, TcxClock, TcxFilterControl, TcxHeader, and TcxNavigator.

Unbound Editors

You can use any unbound editor as a standalone control or an in-place editor embedded into a container control.

The ExpressEditors Library includes the following unbound editors:

TcxBlobEditThe BLOB editor.TcxButtonEditAn unbound single-line text editor with embedded buttons.TcxCalcEditAn editor with a dropdown calculator window.TcxCheckBoxAn unbound check box editor.TcxCheckComboBoxAn unbound combo box editor that can display items with check boxes.TcxCheckGroupAn editor displaying a set of check boxes.TcxCheckListBoxA list box control that enables checking/un-checking of one or more items.TcxColorComboBoxRepresents a color combo box control.TcxComboBoxAn unbound combo box.TcxCurrencyEditAn unbound currency editor.TcxDateEdit TcxDateEdit is an edit control with a dropdown calendar.TcxFontNameComboBoxRepresents a combo box control containing font names available for selection.TcxGroupBoxRepresents the group box control.TcxHyperLinkEditAn unbound hyperlink editor.TcxImageAn unbound image editor.TcxImageComboBoxAn unbound combo box with support for images.TcxLabelRepresents the label control.TcxMaskEdit TcxMaskEdit implements a generic masked edit control.TcxMemoRepresents an edit control that allows editing memo data.TcxMRUEditRepresents a text editor displaying the list of most recently used items (MRU) within a dropdown window.TcxPopupEditRepresents a text editor that enables embedding another control in its popup window.TcxProgressBarRepresents an advanced progress bar control.TcxRadioGroupA container for radio buttons, functioning together.TcxRichEditRepresents an edit control which allows rich text to be edited.TcxShellComboBoxA Shell Combo Box editor.TcxSpinButtonRepresents the spin button.TcxSpinEditRepresents a spin editor.TcxTextEditAn unbound single-line text editor.TcxTimeEditRepresents an editor displaying time values.TcxTrackBarA simple track bar editor.TdxBarCodeAn unbound barcode control.TdxCheckGroupBoxAn unbound checkable group box editor.TdxColorEditAn editor that allows users to pick a color from a color gallery embedded into a dropdown window.TdxDateTimeWheelPickerAn unbound date-time wheel picker editor.TdxFormattedLabelAn unbound formatted label control.TdxNumericWheelPickerAn unbound numeric value wheel picker editor.TdxOfficeSearchBoxA search box suggesting Ribbon or Toolbar UI elements based on user input.TdxRangeTrackBarAn unbound range track bar editor.TdxRatingControlAn unbound rating control.TdxSparklineEditAn unbound sparkline editor.TdxToggleSwitchAn unbound toggle switch editor.TdxTokenEditAn unbound token editor.TdxWheelPickerA generic value wheel picker editor.TdxZoomTrackBarAn unbound zoom track bar editor similar to the zoom slider found in Microsoft Office.

Data-Aware Editors

Data-aware editors are designed to display and modify field values in the underlying dataset. You can use the DataBinding property to bind a data-aware editor directly to a dataset field.

Note

  • Not every unbound editor has a data-aware counterpart.
  • If an editor has both unbound and data-aware versions, you can only use its unbound version as an in-place editor.

The ExpressEditors Library ships with the following data-aware editors:

TcxDBBlobEditRepresents a data-aware control used for displaying and editing BLOB data from a data source.TcxDBButtonEditA data-aware single-line text editor with embedded buttons.TcxDBCalcEditRepresents a data-aware control that enables editing a value via a popup calculator.TcxDBCheckBoxA data-aware check box editor.TcxDBCheckComboBoxA data-aware combo box editor that can display items with check boxes.TcxDBCheckGroupRepresents a data-aware check group control.TcxDBCheckListBoxRepresents the data-aware version of the TcxCheckListBox control.TcxDBColorComboBoxRepresents the data-aware version of the TcxColorComboBox.TcxDBComboBoxA data-aware combo box.TcxDBCurrencyEditA data-aware currency editor.TcxDBDateEditRepresents a data-aware edit control with a dropdown calendar that enables editing date values.TcxDBFontNameComboBoxRepresents a data-aware version of the TcxFontNameComboBox.TcxDBHyperLinkEditA data-aware hyperlink editor.TcxDBImageA data-aware image editor.TcxDBImageComboBoxA data-aware image combo box.TcxDBLabelRepresents data-aware version of the TcxLabel.TcxDBMaskEditRepresents a masked editor that enables displaying and editing text fields within a dataset.TcxDBMemoRepresents a memo editor that enables editing dataset fields.TcxDBMRUEditRepresents a data-aware text editor that stores the list of most recently used items and allows the selection of a value from this list.TcxDBPopupEditRepresents a data-aware text editor with a popup window embedding a control.TcxDBProgressBarRepresents the data-aware version of the TcxProgressBar.TcxDBRadioGroupRepresents a data-aware version of the radio group control.TcxDBRichEditRepresents a data-aware version of the TcxRichEdit control.TcxDBShellComboBoxRepresents the data-aware version of the shell combo box control.TcxDBSpinEditRepresents a spin editor, which enables editing numerical dataset fields.TcxDBTimeEditRepresents a data-aware editor which enables editing time values.TcxDBTrackBarA data-aware track bar editor.TdxDBBarCodeA data-aware barcode control.TdxDBCheckGroupBoxA data-aware checkable group box editor.TdxDBColorEditA data-aware color editor control.TdxDBDateTimeWheelPickerA data-aware date-time wheel picker editor.TdxDBFormattedLabelA data-aware formatted label control.TdxDBLookupSparklineEditA data-aware lookup sparkline editor.TdxDBNumericWheelPickerA data-aware numeric value wheel picker editor.TdxDBRangeTrackBarA data-aware range track bar editor.TdxDBRatingControlA data-aware rating control.TdxDBSparklineEditA data-aware sparkline editor.TdxDBToggleSwitchA data-aware toggle switch editor.TdxDBTokenEditA data-aware token editor.TdxDBZoomTrackBarA data-aware zoom track bar editor similar to the zoom slider found in Microsoft Office.

Implements

IcxEditRepositoryItemListener

IcxInplaceEditIMEHelper

IdxSkinSupport

IdxSpellCheckerControl

IdxFadingObject

IcxEditOwner

IdxTouchModeSupport

Inheritance

Show 11 items

TObject TPersistent TComponent TControl TWinControl TCustomControl TcxCustomControl TcxControl TcxContainer TcxCustomEditContainer TcxCustomEdit

Footnotes

  1. Set the following behavior properties to True or False to enable or disable in-place editor hints in corresponding container controls:

See Also

TcxCustomEditProperties Class

TcxEditRepository Class

TcxCustomEditStyle Class

TcxEditDataBinding Class

TcxCustomEdit Members

cxEdit Unit