Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: CustomMenuItem

[12:7] extends: FxObj

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