Basics
Guides
API Reference
Basics
Guides
API Reference
[12:7] extends: Node, Control
Wraps JavaFX MenuItem, a single selectable item in a Menu or ContextMenu that triggers an action when chosen. Each item displays a text label and optionally an image graphic. Register a click handler with onClick() to respond when the user selects the item. MenuItem is the base type for more specialized items such as CheckMenuItem and RadioMenuItem.
MenuItem (string Name, Img = null)
Initializes a new MenuItem with the specified name and optional image.
Name The name displayed on the menu item.Img An optional Image object to display with the menu item.this objectonClick (callback OnClick)
Sets a callback function to execute when the menu item is clicked.
OnClick The callback function for the click event.void
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.