Show / Hide Table of Contents

Class SelectionButton

Provides a button-like control that changes focus to a designated previous or next selection button when the arrow keys are pushed.

Inheritance
object
ControlBase
ButtonBase
Button
SelectionButton
Inherited Members
Button.RefreshThemeStateColors(Colors)
Button.UpdateAndRedraw(TimeSpan)
Button.CreateControlSurface()
Button.ShowEnds
Button.LeftEndGlyph
Button.RightEndGlyph
Button.EndsThemeState
ButtonBase._textAlignment
ButtonBase.OnClick()
ButtonBase.InvokeClick(bool)
ButtonBase.OnMouseIn(ControlBase.ControlMouseState)
ButtonBase.OnLeftMouseClicked(ControlBase.ControlMouseState)
ButtonBase.OnMouseExit(ControlBase.ControlMouseState)
ButtonBase.Text
ButtonBase.AutoSize
ButtonBase.TextAlignment
ButtonBase.Click
ControlBase.MouseState_IsMouseOver
ControlBase.MouseState_EnteredWithButtonDown
ControlBase.MouseState_IsMouseLeftDown
ControlBase.MouseState_IsMouseRightDown
ControlBase.OnUnfocused()
ControlBase.OnFocused()
ControlBase.OnIsDirtyChanged()
ControlBase.ProcessMouse(MouseScreenObjectState)
ControlBase.LostMouse(MouseScreenObjectState)
ControlBase.OnParentChanged()
ControlBase.OnPositionChanged()
ControlBase.PlaceRelativeTo(ControlBase, Direction.Types, int)
ControlBase.DetermineState()
ControlBase.OnStateChanged(ControlStates, ControlStates)
ControlBase.OnSurfaceChanged(ICellSurface, ICellSurface)
ControlBase.FindThemeFont()
ControlBase.FindThemeColors()
ControlBase.SetThemeColors(Colors)
ControlBase.HasThemeColors()
ControlBase.Resize(int, int)
ControlBase.OnResized()
ControlBase.OnMouseEnter(ControlBase.ControlMouseState)
ControlBase.OnRightMouseClicked(ControlBase.ControlMouseState)
ControlBase.ThemeState
ControlBase.UseKeyboard
ControlBase.UseMouse
ControlBase.CanFocus
ControlBase.CanResize
ControlBase.AlternateFont
ControlBase.Surface
ControlBase.MouseArea
ControlBase.IsMouseButtonStateClean
ControlBase.Position
ControlBase.AbsolutePosition
ControlBase.IsVisible
ControlBase.Tag
ControlBase.TabStop
ControlBase.TabIndex
ControlBase.IsDirty
ControlBase.Name
ControlBase.FocusOnMouseClick
ControlBase.Width
ControlBase.Height
ControlBase.IsFocused
ControlBase.IsEnabled
ControlBase.Bounds
ControlBase.Parent
ControlBase.State
ControlBase.IsDirtyChanged
ControlBase.Focused
ControlBase.Unfocused
ControlBase.PositionChanged
ControlBase.MouseEnter
ControlBase.MouseExit
ControlBase.MouseMove
ControlBase.MouseButtonClicked
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: SadConsole.UI.Controls
Assembly: SadConsole.dll
Syntax
[DataContract]
public class SelectionButton : Button

Constructors

SelectionButton(int, int)

Creates a new Selection Button with a specific width and height.

Declaration
public SelectionButton(int width, int height)
Parameters
Type Name Description
int width

The width of the selection button.

int height

The height of the selection button.

Properties

NextSelection

The selection button to focus when the DOWN key is pressed or the SelectNext() method is called.

Declaration
public SelectionButton? NextSelection { get; set; }
Property Value
Type Description
SelectionButton

PreviousSelection

The selection button to focus when the UP key is pressed or the SelectPrevious() method is called.

Declaration
public SelectionButton? PreviousSelection { get; set; }
Property Value
Type Description
SelectionButton

Methods

ProcessKeyboard(Keyboard)

Focuses the previous or next selection button depending on if the UP or DOWN arrow keys were pressed.

Declaration
public override bool ProcessKeyboard(Keyboard info)
Parameters
Type Name Description
Keyboard info

The keyboard state.

Returns
Type Description
bool
Overrides
ButtonBase.ProcessKeyboard(Keyboard)

SelectNext()

Selects the next selection button.

Declaration
public SelectionButton? SelectNext()
Returns
Type Description
SelectionButton

Returns the next selection button.

SelectPrevious()

Selects the previous selection button.

Declaration
public SelectionButton? SelectPrevious()
Returns
Type Description
SelectionButton

Returns the previous selection button.

SetNextSelection(ref SelectionButton, bool)

Sets the next selection button and optionally sets the previous of the referenced selection to this button.

Declaration
public SelectionButton SetNextSelection(ref SelectionButton nextSelection, bool setPreviousOnNext = true)
Parameters
Type Name Description
SelectionButton nextSelection

The selection button to be used as next.

bool setPreviousOnNext

Sets the PreviousSelection property on the nextSelection instance to current selection button. Defaults to true.

Returns
Type Description
SelectionButton

The button that was passed to the nextSelection parameter.

Extension Methods

ExtensionsSystem.GetDebuggerDisplayValue(object)
In this article

Back to top

Back to top Generated by DocFX