Class ScrollBarView
ScrollBarViews are views that display a 1-character scrollbar, either horizontal or vertical
Implements
System.Collections.IEnumerable
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 ScrollBarView : View, IEnumerable
Remarks
The scrollbar is drawn to be a representation of the Size, assuming that the scroll position is set at Position.
If the region to display the scrollbar is larger than three characters, arrow indicators are drawn.
Constructors
ScrollBarView(Rect, Int32, Int32, Boolean)
Initializes a new instance of the ScrollBarView class.
Declaration
public ScrollBarView(Rect rect, int size, int position, bool isVertical)
Parameters
Type | Name | Description |
---|---|---|
Rect | rect | Frame for the scrollbar. |
System.Int32 | size | The size that this scrollbar represents. |
System.Int32 | position | The position within this scrollbar. |
System.Boolean | isVertical | If set to true this is a vertical scrollbar, otherwise, the scrollbar is horizontal. |
Properties
Position
The position to show the scrollbar at.
Declaration
public int Position { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The position. |
Size
The size that this scrollbar represents
Declaration
public int Size { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The size. |
Methods
MouseEvent(MouseEvent)
Declaration
public override bool MouseEvent(MouseEvent me)
Parameters
Type | Name | Description |
---|---|---|
MouseEvent | me |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
Redraw(Rect)
Redraw the scrollbar
Declaration
public override void Redraw(Rect region)
Parameters
Type | Name | Description |
---|---|---|
Rect | region | Region to be redrawn. |
Overrides
Events
ChangedPosition
This event is raised when the position on the scrollbar has changed.
Declaration
public event Action ChangedPosition
Event Type
Type | Description |
---|---|
System.Action |
Implements
System.Collections.IEnumerable