Class ScrollView
Scrollviews are views that present a window into a virtual space where subviews are added. Similar to the iOS UIScrollView.
Assembly: Terminal.Gui.dll
public class ScrollView : View, IDisposable, ISupportInitializeNotification, ISupportInitialize
Constructors
|
Edit this page
View Source
Declaration
|
Edit this page
View Source
Declaration
public ScrollView(Rect frame)
Parameters
| Type |
Name |
Description |
| Rect |
frame |
|
Properties
|
Edit this page
View Source
If true the vertical/horizontal scroll bars won't be showed if it's not needed.
Declaration
public bool AutoHideScrollBars { get; set; }
Property Value
|
Edit this page
View Source
ContentOffset
Represents the top left corner coordinate that is displayed by the scrollview
Declaration
public Point ContentOffset { get; set; }
Property Value
| Type |
Description |
| Point |
The content offset. |
|
Edit this page
View Source
ContentSize
Represents the contents of the data shown inside the scrollview
Declaration
public Size ContentSize { get; set; }
Property Value
| Type |
Description |
| Size |
The size of the content. |
|
Edit this page
View Source
KeepContentAlwaysInViewport
Get or sets if the view-port is kept always visible in the area of this
ScrollView
Declaration
public bool KeepContentAlwaysInViewport { get; set; }
Property Value
|
Edit this page
View Source
Gets or sets the visibility for the horizontal scroll indicator.
Declaration
public bool ShowHorizontalScrollIndicator { get; set; }
Property Value
| Type |
Description |
| bool |
true if show horizontal scroll indicator; otherwise, false. |
|
Edit this page
View Source
Gets or sets the visibility for the vertical scroll indicator.
Declaration
public bool ShowVerticalScrollIndicator { get; set; }
Property Value
| Type |
Description |
| bool |
true if show vertical scroll indicator; otherwise, false. |
Methods
|
Edit this page
View Source
Adds the view to the scrollview.
Declaration
public override void Add(View view)
Parameters
| Type |
Name |
Description |
| View |
view |
The view to add to the scrollview. |
Overrides
|
Edit this page
View Source
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
protected override void Dispose(bool disposing)
Parameters
| Type |
Name |
Description |
| bool |
disposing |
|
Overrides
|
Edit this page
View Source
Method invoked when a mouse event is generated
Declaration
public override bool MouseEvent(MouseEvent me)
Parameters
Returns
| Type |
Description |
| bool |
true, if the event was handled, false otherwise. |
Overrides
|
Edit this page
View Source
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 |
| bool |
true, if the event was handled, false otherwise. |
Overrides
|
Edit this page
View Source
Positions the cursor in the right position based on the currently focused view in the chain.
Declaration
public override void PositionCursor()
Overrides
|
Edit this page
View Source
If the view is focused, gives the view a
chance to process the keystroke.
Declaration
public override bool ProcessKey(KeyEvent kb)
Parameters
Returns
Overrides
|
Edit this page
View Source
Redraws this view and its subviews; only redraws the views that have been flagged for a re-display.
Declaration
public override void Redraw(Rect region)
Parameters
| Type |
Name |
Description |
| Rect |
region |
|
Overrides
|
Edit this page
View Source
Removes the view from the scrollview.
Declaration
public override void Remove(View view)
Parameters
| Type |
Name |
Description |
| View |
view |
The view to remove from the scrollview. |
Overrides
|
Edit this page
View Source
Removes all widgets from this container.
Declaration
public override void RemoveAll()
Overrides
|
Edit this page
View Source
Scrolls the view down.
Declaration
public bool ScrollDown(int lines)
Parameters
| Type |
Name |
Description |
| int |
lines |
Number of lines to scroll. |
Returns
| Type |
Description |
| bool |
true, if left was scrolled, false otherwise. |
|
Edit this page
View Source
Scrolls the view to the left
Declaration
public bool ScrollLeft(int cols)
Parameters
| Type |
Name |
Description |
| int |
cols |
Number of columns to scroll by. |
Returns
| Type |
Description |
| bool |
true, if left was scrolled, false otherwise. |
|
Edit this page
View Source
Scrolls the view to the right.
Declaration
public bool ScrollRight(int cols)
Parameters
| Type |
Name |
Description |
| int |
cols |
Number of columns to scroll by. |
Returns
| Type |
Description |
| bool |
true, if right was scrolled, false otherwise. |
|
Edit this page
View Source
Scrolls the view up.
Declaration
public bool ScrollUp(int lines)
Parameters
| Type |
Name |
Description |
| int |
lines |
Number of lines to scroll. |
Returns
| Type |
Description |
| bool |
true, if left was scrolled, false otherwise. |
Implements