Class Button | Terminal.Gui v1 (original) (raw)

Button is a View that provides an item that invokes an Action when activated by the user.

public class Button : View, IDisposable, ISupportInitializeNotification, ISupportInitialize

Provides a button showing text invokes an Action when clicked on with a mouse or when the user presses SPACE, ENTER, or hotkey. The hotkey is the first letter or digit following the first underscore ('_') in the button text.

Use HotKeySpecifier to change the hotkey specifier from the default of ('_').

If no hotkey specifier is found, the first uppercase letter encountered will be used as the hotkey.

When the button is configured as the default (IsDefault) and the user presses the ENTER key, if no other View processes the KeyEvent, the Button'sAction will be invoked.