Sub OnChange(Sender: Object; Args: IRibbonChangeEventArgs);
Begin
//set of operators;
End Sub OnChange;
Sender - parameter that returns the component that has generated the event.
Args - parameter that enables the user to determine event parameters.
The OnChange event occurs when any ribbon control elements are used.
The event occurs when the buttons are pressed, the states of checkboxes and radio buttons are changed, any values are selected in the drop-down lists, and so on. The control, which operations have fired the event, can be received using the property of the argument of the Element event.
Executing the example requires a form and the Ribbon component named Ribbon1 on it. The specified procedure has been set as a handler of the OnChange event of the Ribbon1 component.
The controls are checked by identifiers when the event is fired. Having specified his own Case blocks, the user can execute necessary actions, depending on which control was used to generate this event.
See also: