trait_events

classmethod Widget.trait_events(name: str | None = None) dict[str, EventHandler]

Get a dict of all the event handlers of this class.

Parameters:

name (str (default: None)) – The name of a trait of this class. If name is None then all the event handlers of this class will be returned instead.

Return type:

The event handlers associated with a trait name, or all event handlers.