Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: RadioMenuItem

[13:7] extends: FxObj

Wraps JavaFX RadioMenuItem, a menu item that behaves like a radio button, with mutually exclusive selection within a ToggleGroup. Assign multiple RadioMenuItems to the same ToggleGroup so that selecting one automatically deselects the others. Use setSelected() to set the initial state and getSelected() to read it. An onClick() callback fires when the item is chosen.

Methods

  • RadioMenuItem (string Text = "")

    Creates a new RadioMenuItem with the specified text.

    • @p Text is a string with the menu item label.
  • setSelected (bool Selected)

    Sets the selected state.

    • @p Selected is a bool with true to select.
    • @r this object for chaining
  • getSelected ()

    Gets the selected state.

    • @r A bool with true if selected.
  • setToggleGroup (object TgObj)

    Sets the toggle group for mutual exclusion.

    • @p TgObj is a ToggleGroup object.
    • @r this object for chaining
  • onClick (callback OnClick)

    Sets a callback for when the item is clicked.

    • @p OnClick is a callback to call on click.
    • @r this object for chaining