Message
The base class for all messages (including events).
Message
class
¶
Base class for a message.
ALLOW_SELECTOR_MATCH
class-attribute
¶
Additional attributes that can be used with the on
decorator.
These attributes must be widgets.
control
property
¶
The widget associated with this message, or None by default.
prevent_default
method
¶
Suppress the default action(s). This will prevent handlers in any base classes from being called.
Parameters
Parameter | Default | Description |
---|---|---|
prevent
bool
|
True
|
True if the default action should be suppressed, or False if the default actions should be performed. |
set_sender
method
¶
Set the sender of the message.
Parameters
Parameter | Default | Description |
---|---|---|
sender
MessagePump
|
required | The sender. |
Note
When creating a message the sender is automatically set. Normally there will be no need for this method to be called. This method will be used when strict control is required over the sender of a message.
Returns
Type | Description |
---|---|
Self
|
Self. |