Class CheckBox
Implements
System.IDisposable
System.ComponentModel.ISupportInitializeNotification
System.ComponentModel.ISupportInitialize
Inherited Members
Namespace: Terminal.Gui
Assembly: Terminal.Gui.dll
Syntax
public class CheckBox : View
Constructors
CheckBox()
Declaration
public CheckBox()
CheckBox(ustring, Boolean)
Declaration
public CheckBox(ustring s, bool is_checked = false)
Parameters
Type | Name | Description |
---|---|---|
NStack.ustring | s | S. |
System.Boolean | is_checked | If set to true is checked. |
CheckBox(Int32, Int32, ustring)
Declaration
public CheckBox(int x, int y, ustring s)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | x | |
System.Int32 | y | |
NStack.ustring | s |
CheckBox(Int32, Int32, ustring, Boolean)
Declaration
public CheckBox(int x, int y, ustring s, bool is_checked)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | x | |
System.Int32 | y | |
NStack.ustring | s | |
System.Boolean | is_checked |
Properties
Checked
The state of the CheckBox
Declaration
public bool Checked { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
MouseEvent(MouseEvent)
Method invoked when a mouse event is generated
Declaration
public override bool MouseEvent(MouseEvent me)
Parameters
Type | Name | Description |
---|---|---|
MouseEvent | me |
Returns
Type | Description |
---|---|
System.Boolean | true , if the event was handled, false otherwise. |
Overrides
OnEnter(View)
Method invoked when a view gets focus.
Declaration
public override bool OnEnter(View view)
Parameters
Type | Name | Description |
---|---|---|
View | view | The view that is losing focus. |
Returns
Type | Description |
---|---|
System.Boolean | true , if the event was handled, false otherwise. |
Overrides
OnToggled(Boolean)
Declaration
public virtual void OnToggled(bool previousChecked)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | previousChecked |
PositionCursor()
Positions the cursor in the right position based on the currently focused view in the chain.
Declaration
public override void PositionCursor()
Overrides
ProcessHotKey(KeyEvent)
This method can be overwritten by view that
want to provide accelerator functionality
(Alt-key for example).
Declaration
public override bool ProcessHotKey(KeyEvent kb)
Parameters
Type | Name | Description |
---|---|---|
KeyEvent | kb |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
ProcessKey(KeyEvent)
If the view is focused, gives the view a
chance to process the keystroke.
Declaration
public override bool ProcessKey(KeyEvent kb)
Parameters
Type | Name | Description |
---|---|---|
KeyEvent | kb |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
UpdateTextFormatterText()
Can be overridden if the Text has
different format than the default.
Declaration
protected override void UpdateTextFormatterText()
Overrides
Events
Toggled
Toggled event, raised when the CheckBox is toggled.
Declaration
public event Action<bool> Toggled
Event Type
Type | Description |
---|---|
System.Action<System.Boolean> |
Implements
System.IDisposable
System.ComponentModel.ISupportInitializeNotification
System.ComponentModel.ISupportInitialize