TcxDBButtonEdit Class
A data-aware single-line text editor with embedded buttons.
Declaration
TcxDBButtonEdit = class(
TcxCustomButtonEdit
)
Remarks
A button editor is a single-line text editor with one or more embedded buttons and support for masked input.

Button Collection
A button editor maintains a collection of embedded buttons accessible through the Properties.Buttons property.
To associate editor buttons with specific functionality in your application, you can associate each button with an action object (a TBasicAction descendant instance) or handle the Properties.OnButtonClick event.
UI Automation/Accessibility Support
The TcxDBButtonEdit component is mapped to a node in the UI Automation tree when the global UI Automation flag (dxUIAutomationEnabled) is enabled.
UI Automation Settings
Use Automation.Name and Automation.Description properties to specify the editor name and add optional information that are then used to clarify editor purpose for users who rely on third-party assistive tools (such as Microsoft Narrator).
In addition, you can configure UI automation settings at the level of individual buttons using the TdxCustomEditButton.Automation property.
Refer to the TdxAutomationElementSettings class description for detailed information on all available options.
Keyboard Navigation Between Embedded Buttons
The button editor does not implement dedicated key combinations for navigation between multiple embedded buttons. Users need to rely on third-party assistive UIA tools to focus embedded buttons using a keyboard.
To focus an embedded button, you need to use the Move to next item command (or a similar counterpart) in a third-party assistive tool (UIA client) while the parent editor has focus.
For example, you need to press Caps Lock + → or Insert + →[1] while Microsoft Narrator is active.
Default Button
The default editor button is associated with the default action in the editor. Users can press the Ctrl + Enter key combination to activate the button when the editor has focus. You can use the Properties.ClickKey property to change the key combination associated with the default button.
Main API Members
The list below outlines key members of the TcxDBButtonEdit class.
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.
- Styles
- Provides access to individual styles applied to the editor in different states.
- Transparent
- Specifies if the editor is transparent in GDI render mode.
Content-Related APIs
- Clear
- Clears the editor.
- CopyToClipboard | CutToClipboard | PasteFromClipboard
- Allow you to perform clipboard operations.
- EditValue
- Specifies the edit value.
- OnEditing
- Allows you to prevent users from activating the editor.
- ResetEditValue
- Restores the previous edit value before the pending change is applied.
- SelectAll
- Selects editor content.
- ValidateEdit
- Validates the display value.
Data Binding-Related APIs
- DataBinding
- Allows you to bind the editor to data.
- CanPostEditValue
- Indicates if the data-aware editor can post its edit value to the bound data storage.
- OnPostEditValue
- Executes custom code when the editor posts its value to the bound data storage.
- PostEditValue
- Posts the edit value to the bound data storage.
Editor Settings and Repository Items
- ActiveProperties
- Provides access to the current editor settings regardless of their source. This property set does not allow you to customize editor settings.
- GetPropertiesClass
- Returns the actual editor settings type.
- Properties
- Allows you to customize editor settings directly if the editor does not have an assigned repository item.
- RepositoryItem
- Specifies a repository item as an external source of editor settings. A repository item has priority over other editor settings.
General-Purpose API Members
- AutoSize
- Specifies if the editor automatically adjusts its size to fit content.
- Enabled
- Specifies if the editor is enabled.
- CanModify
- Identifies if the editor is in read-only mode.
- IsEditValidating | IsHiding | IsPosting
- Allow you to identify the current operation in the editor.
- ShowHint
- Specifies if the standalone editor can display hints.
- SupportsSpelling
- Identifies if the editor supports the TdxSpellChecker component.
- Width | Height
- Allow you to explicitly define editor dimensions.
Related Compiled Demo
To see the TcxDBButtonEdit component in action, run the Data Editors and Controls demo in the VCL Demo Center installed with compiled DevExpress VCL demos. Click the Button Editor item in the sidebar to run the corresponding demo.
Compiled DevExpress demos ship with source code installed in the Public Documents folder (%PUBLIC%) for all users (default). You can find all project and source code files for the Data Editors and Controls demo in the following folder:
%PUBLIC%\Documents\DevExpress VCL Demos\MegaDemos\Product Demos\ExpressEditors\
Limitations and Considerations
The TcxDBButtonEdit component is available only as a standalone editor. You cannot use data-aware editors as in-place editors in container controls.
Inheritance
-
Refer to the following topic for detailed information on keyboard configuration for Microsoft Narrator: Narrator Keyboard Commands and Touch Gestures.