ASPxClientRichEditHorizontalRulerVisibleChangedEventHandler Interface
A method that handles the HorizontalRulerVisibleChanged event.
Declaration
interface ASPxClientRichEditHorizontalRulerVisibleChangedEventHandler {(source: ASPxClientRichEdit, e: ASPxClientRichEditHorizontalRulerVisibleChangedEventArgs): any;}
Parameters
| Name | Type | Description |
|---|---|---|
| source | ASPxClientRichEdit | The event source. |
| e | ASPxClientRichEditHorizontalRulerVisibleChangedEventArgs | An object that contains event data. |
Remarks
The HorizontalRulerVisibleChanged event fires when the horizontal ruler’s visibility changes:
- A user clicks the Horizontal Ruler button in the ribbon’s View tab.
- The ShowHorizontalRuler command is executed.
Handle this event to update your application’s UI or logic based on the ruler’s visibility. Use the e.horizontalRulerVisible property to obtain the ruler’s new visibility state.
The event does not fire in the following cases:
- The ruler’s visibility does not change (for example, when you call the execute method and pass the current state as a parameter).
- The component applies the initial ruler visibility on load or view type change.
The following code snippet logs the ruler’s new visibility state to the browser console:
richEdit.HorizontalRulerVisibleChanged.AddHandler(function (s, e) {
if (e.horizontalRulerVisible)
console.log('The horizontal ruler is visible');
else
console.log('The horizontal ruler is hidden');
});