Class CheckBox
Represents a button that can be toggled on/off within a group of other buttons.
Inherited Members
Namespace: SadConsole.UI.Controls
Assembly: SadConsole.dll
Syntax
[DataContract]
public class CheckBox : ToggleButtonBase
Constructors
CheckBox(int, int)
Creates a new checkbox control with the specified width and height.
Declaration
public CheckBox(int width, int height)
Parameters
CheckBox(string)
Creates an auto sizing checkbox control with the specified text.
Declaration
public CheckBox(string text)
Parameters
Type | Name | Description |
---|---|---|
string | text |
Properties
BracketsThemeState
The theme state used with the brackets.
Declaration
public ThemeStates BracketsThemeState { get; protected set; }
Property Value
Type | Description |
---|---|
ThemeStates |
CheckedIconColor
An optional color of the CheckedIconGlyph.
Declaration
[DataMember]
public Color? CheckedIconColor { get; set; }
Property Value
Type | Description |
---|---|
Color? |
CheckedIconGlyph
The glyph of the icon when checked.
Declaration
[DataMember]
public int CheckedIconGlyph { get; set; }
Property Value
Type | Description |
---|---|
int |
IconThemeState
The theme state used with the icon of the
Declaration
public ThemeStates IconThemeState { get; protected set; }
Property Value
Type | Description |
---|---|
ThemeStates |
LeftBracketGlyph
The glyph for the left-side bracket of the icon.
Declaration
[DataMember]
public int LeftBracketGlyph { get; set; }
Property Value
Type | Description |
---|---|
int |
RightBracketGlyph
The glyph for the right-side bracket of the icon.
Declaration
[DataMember]
public int RightBracketGlyph { get; set; }
Property Value
Type | Description |
---|---|
int |
UncheckedIconColor
An optional color of the UncheckedIconGlyph.
Declaration
[DataMember]
public Color? UncheckedIconColor { get; set; }
Property Value
Type | Description |
---|---|
Color? |
UncheckedIconGlyph
The glyph of the icon when unchecked.
Declaration
[DataMember]
public int UncheckedIconGlyph { get; set; }
Property Value
Type | Description |
---|---|
int |
Methods
CreateControlSurface()
Declaration
protected override ICellSurface CreateControlSurface()
Returns
Type | Description |
---|---|
ICellSurface | The control's surface. |
Overrides
EstimateControlSurface()
Declaration
protected Rectangle EstimateControlSurface()
Returns
Type | Description |
---|---|
Rectangle |
OnClick()
Perfroms a click on the base button and also toggles the IsSelected property.
Declaration
protected override void OnClick()
Overrides
RefreshThemeStateColors(Colors)
Updates the ThemeState by calling RefreshTheme(Colors) with the provided colors. Override this method to adjust how colors are used by the ThemeState.
Declaration
protected override void RefreshThemeStateColors(Colors colors)
Parameters
Type | Name | Description |
---|---|---|
Colors | colors | The colors to apply to the theme state. |
Overrides
UpdateAndRedraw(TimeSpan)
Redraws the control if applicable.
Declaration
public override void UpdateAndRedraw(TimeSpan time)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | time | The duration of thecurrent frame. |