Check documentation for the latest version of dhtmlxSuite Handling Events DHTMLX Docs

Handling Events

Attaching Event Handler

The user can add any user-defined handler to available events. To do this he can use attachEvent() method with the following parameters:

  • evName - name of the event;
  • evHandler - user-defined event handler.
myRibbon.attachEvent(evName, evHandler);

Several handlers can be attached to one and the same event, and all of them will be executed.

The names of the events are case-insensitive.

Detaching Event Handler

There is a simple way of removing an event-handler:

myRibbon.detachEvent(id); // unique id of the event handler

List of supported events

You can find the full list of ribbon events in the Ribbon API.

Back to top