klyn.gui.terminal.MenuBar.setTrailingMenu
method
public setTrailingMenu(key as Object, title as String, compactTitle as String = "", action as Invocable<Void> = null) as Void:
Description

Adds or updates the menu entry anchored to the right edge.

Only one entry is anchored at a time. Registering another trailing entry returns the previous one to the regular left-aligned menu flow.

Parameters
ParameterDescription
keyKeyboard shortcut associated with the entry.
titleFull entry title.
compactTitleShort title used when terminal width is constrained.
actionOptional action invoked by the shortcut or a mouse click.
Example
bar.setTrailingMenu("F10", "Exit", "Exit", lambda(): Terminal.instance.exit())