ContextMenuDismissEvent
Inherits: Event['ContextMenu']
Event fired when a ContextMenu is dismissed.
Properties
-
button(str | None) –Mouse button that triggered the menu.
-
global_position(Offset) –Global pointer position in logical pixels.
-
item_count(int | None) –Total number of entries displayed in the corresponding context menu.
-
local_position(Offset | None) –Local pointer position relative to the wrapped control.
-
trigger(ContextMenuTrigger | None) –The trigger mode that opened the menu.
Properties#
button
class-attribute
instance-attribute
#
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 pointer position in logical pixels.
item_count
class-attribute
instance-attribute
#
Total number of entries displayed in the corresponding context menu.
local_position
class-attribute
instance-attribute
#
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.