Table of Contents

Class ScrollView

Namespace
Terminal.Gui
Assembly
Terminal.Gui.dll

Scrollviews are views that present a window into a virtual space where subviews are added. Similar to the iOS UIScrollView.

public class ScrollView : View, IDisposable, ISupportInitializeNotification, ISupportInitialize
Inheritance
ScrollView
Implements
Inherited Members

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 GetContentSize().

Use the

Constructors

ScrollView()

Initializes a new instance of the ScrollView class.

Properties

AutoHideScrollBars

If true the vertical/horizontal scroll bars won't be showed if it's not needed.

ContentOffset

Represents the top left corner coordinate that is displayed by the scrollview

KeepContentAlwaysInViewport

Get or sets if the view-port is kept always visible in the area of this ScrollView

ShowHorizontalScrollIndicator

Gets or sets the visibility for the horizontal scroll indicator.

ShowVerticalScrollIndicator

Gets or sets the visibility for the vertical scroll indicator.

Methods

Add(View)

Adds the view to the scrollview.

Dispose(bool)

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

OnDrawingContent()

Called when the View's content is to be drawn. The default implementation does nothing.

OnKeyDown(Key)

Called when the user presses a key, allowing subscribers to pre-process the key down event. Called before key bindings are invoked and KeyDownNotHandled is raised. Set Handled to true to stop the key from being processed further.

OnMouseEvent(MouseEventArgs)

Called when a mouse event occurs within the view's Viewport.

PositionCursor()

Positions the cursor in the right position based on the currently focused view in the chain.

Remove(View)

Removes the view from the scrollview.

RemoveAll()

Removes all widgets from this container.

ScrollDown(int)

Scrolls the view down.

ScrollLeft(int)

Scrolls the view to the left

ScrollRight(int)

Scrolls the view to the right.

ScrollUp(int)

Scrolls the view up.