Reference

ContextMenu

ContextMenu

ContextMenu control. Build it with the context_menu helper.

Example

context_menu(
  content: text("ContextMenu"),
  expand: true,
  width: 240,
  height: 120,
  on_animation_end: ->(event) {}
)

Properties

  • content — The single child control rendered inside this control.
  • items
  • primary_items
  • primary_trigger
  • secondary_items
  • secondary_trigger
  • tertiary_items
  • tertiary_trigger

Plus the common layout and animation properties shared by most controls (expand, visible, disabled, opacity, width, height, align, tooltip, animate_*, …).

Events

  • on_animation_end — Fired when an animation completes.
  • on_dismiss — Fired when the control is dismissed.
  • on_select — Fired when a selection is made.
  • on_size_change — Fired when the control's size changes.

Reference

  • Family: materials
  • Widget type: contextmenu
  • Helper: context_menu