Skip to content

ContextMenuSelectEvent 继承自: ContextMenuDismissEvent, Event['ContextMenu']

Event fired when a ContextMenu item is selected.

属性 ​

名称类型默认值说明
item_idOptional[int]NoneInternal numeric identifier of the selected menu item.
item_indexOptional[int]NoneIndex of the selected menu entry within the rendered list.
global_positionOffsetmetadata={'data_field': 'g'}Global pointer position in logical pixels.
local_positionOptional[Offset]NoneLocal pointer position relative to the wrapped control.
buttonOptional[str]NoneMouse button that triggered the menu. If a string, can be one of: "primary" (linked to primary_items), "secondary" (linked to secondary_items), or "tertiary" (linked to tertiary_items).
triggerOptional[ContextMenuTrigger]NoneThe trigger mode that opened the menu.
item_countOptional[int]NoneTotal number of entries displayed in the corresponding context menu.

只读属性 ​

名称类型默认值说明
itemOptional[PopupMenuItem]—The selected menu item.

关注我,学习大模型、大数据、Python等热门技术。