Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: ContextMenu

[13:7] extends: FxObj

Wraps JavaFX ContextMenu, a pop-up menu that appears at a cursor position or relative to a control, containing MenuItem entries. Items are added with add(), which accepts a single MenuItem or a list of MenuItems. The context menu is typically shown in response to a right-click event by calling the underlying JavaFX show() method on the wrapped object with the anchor node and screen coordinates.

Methods

  • ContextMenu ()

    Creates a new ContextMenu.

  • add (Items)

    Adds one or more menu items.

    • @p Items is a MenuItem or a list of MenuItems.
    • @r this object for chaining