tornadofx / tornadofx / javafx.scene.control.Menu / menuitem

menuitem

fun Menu.menuitem(name: String, keyCombination: String, graphic: Node? = null, onAction: () -> Unit = {}): <ERROR CLASS>
Deprecated: Use the item builder instead, which expects an action parameter


fun Menu.menuitem(name: String, keyCombination: KeyCombination? = null, graphic: Node? = null, onAction: (ActionEvent) -> Unit = {}): <ERROR CLASS>
Deprecated: Use the item builder instead, which expects an action parameter

Create a MenuItem. The op block will be configured as the setOnAction. This will be deprecated in favor of the item call, where the op block operates on the MenuItem. This deprecation was made to align the menuitem builder with the other builders.