Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: CustomMenuItem

[14:7] extends: MenuItem

Wraps JavaFX CustomMenuItem, a menu item that embeds an arbitrary JavaFX node as its content. This allows controls such as sliders, text fields, or any other node to appear inline within a menu. The setHideOnClick() method controls whether the menu closes when the user interacts with the embedded node, which is useful for controls that need repeated interaction.

Methods

  • CustomMenuItem (object ContentObj = null)

    Creates a new CustomMenuItem with optional content.

    • @p ContentObj is an optional Node to display.
  • setContent (object ContentObj)

    Sets the content node.

    • @p ContentObj is a Node to display.
    • @r this object for chaining
  • setHideOnClick (bool Hide)

    Sets whether the menu hides when this item is clicked.

    • @p Hide is a bool with true to hide on click.
    • @r this object for chaining
  • getContent ()

    Returns the content Node AJO.

    • @r An AJO around the content Node or null.
  • contentProperty ()

    Returns the ObjectProperty AJO for the content node.

    • @r An AJO around the content ObjectProperty.
  • isHideOnClick ()

    Returns whether the menu hides when the item is clicked.

    • @r A bool with true if it hides on click.
  • hideOnClickProperty ()

    Returns the BooleanProperty AJO for hideOnClick.

    • @r An AJO around the hideOnClick BooleanProperty.