ContextMenuDismissEvent
Event fired when a ContextMenu is dismissed.
Inherits: Event
Properties
button- Mouse button that triggered the menu.global_position- Global pointer position in logical pixels.item_count- Total number of entries displayed in the corresponding context menu.local_position- Local pointer position relative to the wrapped control.trigger- The trigger mode that opened the menu.
Properties
buttonclass-attributeinstance-attribute
button: Optional[str] = field(default=None, metadata={'data_field': 'b'})Mouse button that triggered the menu.
If a string, can be one of:
"primary" (linked to flet.ContextMenu.primary_items),
"secondary" (linked to flet.ContextMenu.secondary_items),
or "tertiary" (linked to flet.ContextMenu.tertiary_items).
global_positionclass-attributeinstance-attribute
global_position: Offset = field(metadata={'data_field': 'g'})Global pointer position in logical pixels.
item_countclass-attributeinstance-attribute
item_count: Optional[int] = field(default=None, metadata={'data_field': 'ic'})Total number of entries displayed in the corresponding context menu.
local_positionclass-attributeinstance-attribute
local_position: Optional[Offset] = field(default=None, metadata={'data_field': 'l'})Local pointer position relative to the wrapped control.
triggerclass-attributeinstance-attribute
trigger: Optional[ContextMenuTrigger] = field(default=None, metadata={'data_field': 'tr'})The trigger mode that opened the menu.