TcxCustomEditProperties.OnButtonClick Event
Allows you to execute custom code when a user clicks an embedded editor button.
Declaration
property OnButtonClick: TcxEditButtonClickEvent read; write;
Remarks
You can handle the OnButtonClick
event to execute custom code when a user clicks one of the buttons within the editor client area. Alternatively, you can use an editor button’s Action property to associate the button with an action object (a TBasicAction descendant instance).
Event Occurrence
The editor raises the OnButtonClick
event in the following cases:
- Every time a user clicks one of the editor buttons accessible through the Buttons property.
- Every time a user presses the keystroke defined in the ClickKey property while the editor has focus. This action corresponds to a click on the default editor button (the editor button whose Default property is set to
True
).
Note
The OnButtonClick
event never occurs for all editor buttons whose Enabled property is set to False
or Mode property is set to TcxEditButtonMode.Glyph.
Event Parameters
You can use the AButtonIndex
parameter to identify the clicked button and execute different code in response to clicks on different buttons. The returned value is the button index in the editor button collection accessible through the Buttons property.
Refer to the TcxEditButtonClickEvent procedural type description for detailed information on all parameters accessible within an OnButtonClick
event handler.