Class CheckBox
Implements
System.IDisposable
System.ComponentModel.ISupportInitializeNotification
System.ComponentModel.ISupportInitialize
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Terminal.Gui
Assembly: Terminal.Gui.dll
Syntax
public class CheckBox : View, IDisposable, ISupportInitializeNotification, ISupportInitialize
Constructors
| Improve this Doc View SourceCheckBox()
Declaration
public CheckBox()
CheckBox(Int32, Int32, ustring)
Declaration
public CheckBox(int x, int y, ustring s)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | x | |
System.Int32 | y | |
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 | |
ustring | s | |
System.Boolean | is_checked |
CheckBox(ustring, Boolean)
Declaration
public CheckBox(ustring s, bool is_checked = false)
Parameters
Type | Name | Description |
---|---|---|
ustring | s | S. |
System.Boolean | is_checked | If set to true is checked. |
Properties
| Improve this Doc View SourceChecked
The state of the CheckBox
Declaration
public bool Checked { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
| Improve this Doc View SourceMouseEvent(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
| Improve this Doc View SourceOnEnter(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
| Improve this Doc View SourceOnToggled(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
| Improve this Doc View SourceProcessHotKey(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
| Improve this Doc View SourceProcessKey(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
| Improve this Doc View SourceUpdateTextFormatterText()
Can be overridden if the Text has
different format than the default.
Declaration
protected override void UpdateTextFormatterText()
Overrides
Events
| Improve this Doc View SourceToggled
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