vcl-cxedit-58d2244d.md
The base class for all editor appearance and behavior settings.
TcxCustomEditProperties = class(
TcxInterfacedPersistent,
IdxScaleFactor,
IdxFreeNotify
)
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.
The list below outlines key members of the TcxCustomEditProperties class that allow you to configure editors.
Alignment | UseLeftAlignmentOnEditingSpecify content alignment.ImagesSpecifies the image source for editor button glyphs.OnButtonGlyphDrawParametersAllows you to customize the appearance of editor button glyphs.
Provides access to UI Automation and accessibility-related settings.
Tip
Use Automation.Name, Automation.Description, and other API members to specify information visible to third-party assistive tools as UIA node properties.
AutoSelectSpecifies if the editor automatically selects its content when it receives focus.Buttons | ButtonsViewStyleAllow you to manage and configure embedded editor buttonsClearKey | ClickKeyAllow you to associate keystrokes with basic user actions.OnButtonClick | OnClosePopupAllow you to execute custom code when a user clicks embedded editor buttons and closes the editor’s drop-down window.ReadOnlyEnables 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.UseMouseWheelSpecifies if the editor always responds to mouse wheel rotation.
BeepOnErrorAllows you to play the standard system sound when a validation error occurs.ErrorIcon | ValidationErrorIconAlignmentSpecify and position an error icon.ValidateDisplayValue | ValidateOnEnter | CanValidate | OnValidate | IsEditValueValidAllow you to validate user input.ValidationOptionsSpecifies validation option flags.
AssignedValues | RestoreDefaultsAllow you to track the state of individual editor-specific settings and reset them.BeginUpdate | EndUpdate | LockUpdate | DoUpdate | Update | Changed | ChangedLocked | DataChangedAllow you to manage editor updates and avoid excessive redraw operations during batch editor setting changes.GetButtonsClass | GetContainerClass | GetStyleClass | GetViewInfoClassReturn editor property value types.GetSupportedOperationsReturns a set of flags that correspond to supported operations.
The following public API members reference a TcxCustomEditProperties object:
TcxCustomGridTableItem.PropertiesProvides access to active in-place editor settings.TcxCustomEdit.ActivePropertiesProvides access to active editor settings.TcxCustomEdit.PropertiesProvides access to editor settings.TcxEditRepositoryItem.PropertiesProvides access to stored editor settings.TcxCustomInplaceEditContainer.PropertiesProvides access to active in-place editor settings.TcxCustomBarEditItem.PropertiesProvides access to active in-place editor settings.TcxCustomBarEditItem.GetPropertiesReturns embedded editor settings.TcxPivotGridField.PropertiesProvides access to active editor settings.TcxCustomEditorRowProperties.EditPropertiesProvides 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.
The following TcxCustomEditProperties class descendants correspond to in-place editors in container controls:
TdxBarCodePropertiesStores barcode appearance settings.TcxBlobEditPropertiesContains settings specific to BLOB editors.TcxButtonEditPropertiesStores button editor settings.TcxCalcEditPropertiesRepresents settings specific to editors with dropdown calculators.TcxCheckBoxPropertiesStores check box settings.TcxCheckComboBoxPropertiesProvides properties specific to check combo box controls.TcxCheckGroupPropertiesProvides settings specific for the TcxCheckGroup and TcxDBCheckGroup editors.TcxColorComboBoxPropertiesStores color combo box settings.TdxColorEditPropertiesStores attributes specific to a color editor.TcxComboBoxPropertiesStores combo box editor settings.TcxCurrencyEditPropertiesStores currency editor settings.TcxDateEditPropertiesRepresents properties specific to date editors.TdxDateTimeWheelPickerPropertiesContains settings of the date-time wheel picker editor.TcxExtLookupComboBoxPropertiesContains settings for ExtLookupEditors.TcxFontNameComboBoxPropertiesStores settings of a font name combo box editor (also called font picker).TdxFormattedLabelPropertiesStores formatted label settings.TcxHyperLinkEditPropertiesContains settings specific to hyperlinks editors.TcxImagePropertiesStores image editor settings.TcxImageComboBoxPropertiesStores image combo box editor settings.TcxLabelPropertiesRepresents a set of attributes specific to label controls.TcxLookupComboBoxPropertiesContains settings controlling the behavior of TcxLookupComboBox and TcxDBLookupComboBox editors.TdxLookupSparklinePropertiesContains a lookup sparkline editor‘s settings.TcxMaskEditPropertiesPublishes members of the TcxCustomMaskEditProperties object.TcxMemoPropertiesContains settings specific to memo editors.TcxMRUEditPropertiesContains settings specific to MRU editors.TdxNumericWheelPickerPropertiesContains settings of the numeric value wheel picker editor.TdxOfficeSearchBoxPropertiesStores Office Search Box settings.TcxPopupEditPropertiesStores pop-up editor settings.TcxProgressBarPropertiesContains specific settings of the progress bar control.TcxRadioGroupPropertiesContains settings specific to radio group controls.TdxRangeTrackBarPropertiesContains range track bar settings.TdxRatingControlPropertiesContains rating control settings.TcxRichEditPropertiesRepresents settings specific to rich text editors.TcxShellComboBoxPropertiesContains settings specific to shell combo box editors.TdxSparklinePropertiesContains the sparkline editor’s settings.TcxSpinEditPropertiesContains settings specific to spin editors.TcxTextEditPropertiesContains settings specific to text editors.TcxTimeEditPropertiesRepresents settings specific to time editors.TdxToggleSwitchPropertiesContains toggle switch editor settings.TdxTokenEditPropertiesContains the token editor‘s appearance and behavior settings.TcxTrackBarPropertiesStores track bar editor settings.
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;
#include "cxTextEdit.hpp"
// ...
TcxGridDBColumn *AGridColumn;
TcxGridDBTableView *AGridTableView;
TcxTextEditProperties *ATextEditProperties;
// ...
AGridTableView = dynamic_cast<TcxGridDBTableView*>(cxGrid1->ActiveView);
AGridColumn = AGridTableView->Columns[0];
AGridColumn->PropertiesClass = __classid(TcxTextEditProperties);
ATextEditProperties = dynamic_cast<TcxTextEditProperties*>(AGridColumn->Properties);
ATextEditProperties->BeginUpdate();
try
{
ATextEditProperties->Alignment->Horz = taRightJustify;
ATextEditProperties->AutoSelect = false;
}
__finally
{
ATextEditProperties->EndUpdate();
}
Certain editors do not support buttons (labels and check boxes, for instance). Refer to individual editor and editor setting class descriptions for detailed information.
TObject TPersistent TInterfacedPersistent TcxInterfacedPersistent TcxCustomEditProperties
See Also