Skip to main content

TcxCustomEditProperties Class

The base class for all editor appearance and behavior settings.

Declaration

TcxCustomEditProperties = class(
    TcxInterfacedPersistent,
    IdxScaleFactor,
    IdxFreeNotify
)

Remarks

Every standalone and in-place editor from the ExpressEditors Library has multiple common appearance and behavior settings accessible through Properties and ActiveProperties properties. All terminal TcxCustomEdit class descendants override these properties to implement settings specific to individual editors.

You can use the Properties property to configure an editor. Alternatively, you can create a settings repository item and assign it to the RepositoryItem property of all target editors to apply the same settings to them.

Main API Members

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

Appearance Options

Alignment | UseLeftAlignmentOnEditing
Specify content alignment.
Images
Specifies the image source for editor button glyphs.
OnButtonGlyphDrawParameters
Allows you to customize the appearance of editor button glyphs.

User Interaction Options

Automation
Provides access to UI Automation and accessibility settings.
AutoSelect
Specifies if the editor automatically selects its content when it receives focus.
Buttons | ButtonsViewStyle
Allow you to manage and configure embedded editor buttons
ClearKey | ClickKey
Allow you to associate keystrokes with basic user actions.
OnButtonClick | OnClosePopup
Allow you to execute custom code when a user clicks embedded editor buttons and closes the editor’s drop-down window.
ReadOnly
Enables or disables read-only mode. You can use the editor’s Style.ReadOnly and StyleReadOnly properties to customize editor appearance options for the read-only state.
UseMouseWheel
Specifies if the editor always responds to mouse wheel rotation.

Edit Value Validation

BeepOnError
Allows you to play the standard system sound when a validation error occurs.
ErrorIcon | ValidationErrorIconAlignment
Specify and position an error icon.
ValidateDisplayValue | ValidateOnEnter | CanValidate | OnValidate | IsEditValueValid
Allow you to validate user input.
ValidationOptions
Specifies validation option flags.

General-Purpose API Members

AssignedValues | RestoreDefaults
Allow you to track the state of individual editor-specific settings and reset them.
BeginUpdate | EndUpdate | LockUpdate | DoUpdate | Update | Changed | ChangedLocked | DataChanged
Allow you to manage editor updates and avoid excessive redraw operations during batch editor setting changes.
GetButtonsClass | GetContainerClass | GetStyleClass | GetViewInfoClass
Return editor property value types.

Direct TcxCustomEditProperties Class References

The following public API members reference a TcxCustomEditProperties object:

TcxCustomGridTableItem.Properties
Provides access to active in-place editor settings.
TcxCustomEdit.ActiveProperties
Provides access to active editor settings.
TcxCustomEdit.Properties
Provides access to editor settings.
TcxEditRepositoryItem.Properties
Provides access to stored editor settings.
TcxCustomInplaceEditContainer.Properties
Provides access to active in-place editor settings.
TcxCustomBarEditItem.Properties
Provides access to active in-place editor settings.
TcxCustomBarEditItem.GetProperties
Returns embedded editor settings.
TcxPivotGridField.Properties
Provides access to active editor settings.
TcxCustomEditorRowProperties.EditProperties
Provides access to active in-place editor settings.

You need to cast the returned object to the corresponding terminal TcxCustomEditProperties class descendant. You can call the ClassType function to identify the actual editor settings type.

Terminal TcxCustomEditProperties Class Descendants

The following TcxCustomEditProperties class descendants correspond to in-place editors in container controls:

TdxBarCodeProperties
Stores barcode appearance settings.
TcxBlobEditProperties
Contains settings specific to BLOB editors.
TcxButtonEditProperties
Stores button editor settings.
TcxCalcEditProperties
Represents settings specific to editors with dropdown calculators.
TcxCheckBoxProperties
Contains properties specific to check box editors.
TcxCheckComboBoxProperties
Provides properties specific to check combo box controls.
TcxCheckGroupProperties
Provides settings specific for the TcxCheckGroup and TcxDBCheckGroup editors.
TcxColorComboBoxProperties
Stores color combo box settings.
TdxColorEditProperties
Stores attributes specific to a color editor.
TcxComboBoxProperties
Stores combo box editor settings.
TcxCurrencyEditProperties
Contains settings specific to currency editors.
TcxDateEditProperties
Represents properties specific to date editors.
TdxDateTimeWheelPickerProperties
Contains settings of the date-time wheel picker editor.
TcxExtLookupComboBoxProperties
Contains settings for ExtLookupEditors.
TcxFontNameComboBoxProperties
Stores settings of a font name combo box editor (also called font picker).
TdxFormattedLabelProperties
Contains a formatted label control’s settings.
TcxHyperLinkEditProperties
Contains settings specific to hyperlinks editors.
TcxImageProperties
Stores image editor settings.
TcxImageComboBoxProperties
Stores image combo box editor settings.
TcxLabelProperties
Represents a set of attributes specific to label controls.
TcxLookupComboBoxProperties
Contains settings controlling the behavior of TcxLookupComboBox and TcxDBLookupComboBox editors.
TdxLookupSparklineProperties
Contains a lookup sparkline editor‘s settings.
TcxMaskEditProperties
Publishes members of the TcxCustomMaskEditProperties object.
TcxMemoProperties
Contains settings specific to memo editors.
TcxMRUEditProperties
Contains settings specific to MRU editors.
TdxNumericWheelPickerProperties
Contains settings of the numeric value wheel picker editor.
TdxOfficeSearchBoxProperties
Contains the search box settings.
TcxPopupEditProperties
Stores pop-up editor settings.
TcxProgressBarProperties
Contains specific settings of the progress bar control.
TcxRadioGroupProperties
Contains settings specific to radio group controls.
TdxRangeTrackBarProperties
Contains range track bar settings.
TdxRatingControlProperties
Contains rating control settings.
TcxRichEditProperties
Represents settings specific to rich text editors.
TcxShellComboBoxProperties
Contains settings specific to shell combo box editors.
TdxSparklineProperties
Contains the sparkline editor’s settings.
TcxSpinEditProperties
Contains settings specific to spin editors.
TcxTextEditProperties
Contains settings specific to text editors.
TcxTimeEditProperties
Represents settings specific to time editors.
TdxToggleSwitchProperties
Contains toggle switch editor settings.
TdxTokenEditProperties
Contains the token editor‘s appearance and behavior settings.
TcxTrackBarProperties
Represents the class containing track bar editor specific settings.

Code Example

The following code example assigns a single-line text editor to the first Data Grid column, changes text alignment, and disables automatic text selection at runtime.

uses cxTextEdit;
// ...
var
  AGridColumn: TcxGridDBColumn;
  AGridTableView: TcxGridDBTableView;
  ATextEditProperties: TcxTextEditProperties;
begin
  AGridTableView := TcxGridDBTableView(cxGrid1.ActiveView);
  AGridColumn := AGridTableView.Columns[0];
  AGridColumn.PropertiesClass := TcxTextEditProperties;
  ATextEditProperties := AGridColumn.Properties as TcxTextEditProperties;
  ATextEditProperties.BeginUpdate;
  try
    ATextEditProperties.Alignment.Horz := taRightJustify;
    ATextEditProperties.AutoSelect := False;
  finally
    ATextEditProperties.EndUpdate;
  end;
end;

Limitations

Certain editors do not support buttons (labels and check boxes, for instance). Refer to individual editor and editor setting class descriptions for detailed information.

See Also