Table of Contents

Class StatusItem

Namespace
Terminal.Gui
Assembly
Terminal.Gui.dll

StatusItem objects are contained by StatusBarViews. Each StatusItem has a title, a shortcut (hotkey), and an Action that will be invoked when the Shortcut is pressed. The Shortcut will be a global hotkey for the application in the current context of the screen. The colour of the Title will be changed after each ~ (can be customized using HotTextSpecifier). A Title set to ~F1~ Help will render as F1 using HotNormal and Help as Normal.

public class StatusItem
Inheritance
StatusItem
Inherited Members

Constructors

StatusItem(Key, ustring, Action, Func<bool>)

Initializes a new StatusItem.

Properties

Action

Gets or sets the action to be invoked when the statusbar item is triggered

CanExecute

Gets or sets the action to be invoked to determine if the StatusItem can be triggered. If CanExecute returns true the status item will be enabled. Otherwise, it will be disabled.

Data

Gets or sets arbitrary data for the status item.

HotTextSpecifier

Gets or sets the rune that toggles the text color between Normal and HotNormal. The default value is '~'. Therefore, '~F1~ Help' will be rendered as 'F1' using HotNormal and 'Help' using Normal. In order to use '~' as part of the title (e.g., to denote the home directory as a part of the current directory), HotTextSpecifier should be changed to a different rune.

Shortcut

Gets the global shortcut to invoke the action on the menu.

Title

Gets or sets the title.

Methods

IsEnabled()

Returns true if the status item is enabled. This method is a wrapper around CanExecute.