Skip to content

ContextMenuDismissEvent

Inherits: Event['ContextMenu']

Event fired when a ContextMenu is dismissed.

Properties

Properties#

button class-attribute instance-attribute #

button: str | None = field(
    default=None, metadata={"data_field": "b"}
)

Mouse button that triggered the menu.

If a string, can be one of: "primary" (linked to ContextMenu.primary_items), "secondary" (linked to ContextMenu.secondary_items), or "tertiary" (linked to ContextMenu.tertiary_items).

global_position class-attribute instance-attribute #

global_position: Offset = field(
    metadata={"data_field": "g"}
)

Global pointer position in logical pixels.

item_count class-attribute instance-attribute #

item_count: int | None = field(
    default=None, metadata={"data_field": "ic"}
)

Total number of entries displayed in the corresponding context menu.

local_position class-attribute instance-attribute #

local_position: Offset | None = field(
    default=None, metadata={"data_field": "l"}
)

Local pointer position relative to the wrapped control.

trigger class-attribute instance-attribute #

trigger: ContextMenuTrigger | None = field(
    default=None, metadata={"data_field": "tr"}
)

The trigger mode that opened the menu.