Class ScrollView
Scrollviews are views that present a window into a virtual space where children views are added. Similar to the iOS UIScrollView.
Inherited Members
Namespace: Terminal.Gui
Assembly: Terminal.Gui.dll
Syntax
public class ScrollView : Terminal.Gui.View
Remarks
The subviews that are added to this scrollview are offset by the ContentOffset property. The view itself is a window into the space represented by the ContentSize.
Constructors
ScrollView(Rect)
Declaration
public ScrollView (Terminal.Gui.Rect frame);
Parameters
Type | Name | Description |
---|---|---|
Rect | frame | To be added. |
Properties
ContentOffset
Represents the top left corner coordinate that is displayed by the scrollview
Declaration
public Terminal.Gui.Point ContentOffset { get; set; }
Property Value
Type | Description |
---|---|
Point | The content offset. |
ContentSize
Represents the contents of the data shown inside the scrolview
Declaration
public Terminal.Gui.Size ContentSize { get; set; }
Property Value
Type | Description |
---|---|
Size | The size of the content. |
ShowHorizontalScrollIndicator
Gets or sets the visibility for the horizontal scroll indicator.
Declaration
public bool ShowHorizontalScrollIndicator { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
ShowVerticalScrollIndicator
/// Gets or sets the visibility for the vertical scroll indicator.
Declaration
public bool ShowVerticalScrollIndicator { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Methods
Add(View)
Adds the view to the scrollview.
Declaration
public override void Add (Terminal.Gui.View view);
Parameters
Type | Name | Description |
---|---|---|
View | view | The view to add to the scrollview. |
PositionCursor()
Declaration
public override void PositionCursor ();
ProcessKey(KeyEvent)
Declaration
public override bool ProcessKey (Terminal.Gui.KeyEvent kb);
Parameters
Type | Name | Description |
---|---|---|
KeyEvent | kb | To be added. |
Returns
Type | Description |
---|---|
System.Boolean | To be added. |
Redraw(Rect)
Declaration
public override void Redraw (Terminal.Gui.Rect region);
Parameters
Type | Name | Description |
---|---|---|
Rect | region | To be added. |
ScrollDown(Int32)
Scrolls the view down.
Declaration
public bool ScrollDown (int lines);
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | lines | Number of lines to scroll. |
Returns
Type | Description |
---|---|
System.Boolean |
|
ScrollLeft(Int32)
Scrolls the view to the left
Declaration
public bool ScrollLeft (int cols);
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | cols | Number of columns to scroll by. |
Returns
Type | Description |
---|---|
System.Boolean |
|
ScrollRight(Int32)
Scrolls the view to the right.
Declaration
public bool ScrollRight (int cols);
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | cols | Number of columns to scroll by. |
Returns
Type | Description |
---|---|
System.Boolean |
|
ScrollUp(Int32)
Scrolls the view up.
Declaration
public bool ScrollUp (int lines);
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | lines | Number of lines to scroll. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Events
Scrolled
This event is raised when the contents have scrolled
Declaration
public event Action<Terminal.Gui.ScrollView> Scrolled;
Event Type
Type | Description |
---|---|
System.Action<ScrollView> | To be added. |