traitsui.delegating_handler module

A handler that delegates the handling of events to a set of sub-handlers.

This is typically used as the handler for dynamic views. See the traits.has_dynamic_view module.

class traitsui.delegating_handler.DelegatingHandler[source]

Bases: Handler

A handler that delegates the handling of events to a set of sub-handlers.

closed(info, is_ok)[source]

Handles the user interface being closed by the user.

This method is overridden here to unregister any dispatchers that were set up in the init() method.

init(info)[source]

Initializes the controls of a user interface.

This method is called after all user interface elements have been created, but before the user interface is displayed. Use this method to further customize the user interface before it is displayed.

This method is overridden here to delegate to sub-handlers.

Parameters:

info (UIInfo object) – The UIInfo object associated with the view

Returns:

initialized – A boolean, indicating whether the user interface was successfully initialized. A True value indicates that the UI can be displayed; a False value indicates that the display operation should be cancelled.

Return type:

bool

sub_handlers = List(HasTraits)

The list of sub-handlers this object delegates to: