Table of Contents

Class ScrollBarView

Namespace
Terminal.Gui
Assembly
Terminal.Gui.dll

ScrollBarViews are views that display a 1-character scrollbar, either horizontal or vertical

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

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

Initializes a new instance of the ScrollBarView class.

ScrollBarView(View, bool, bool)

Initializes a new instance of the ScrollBarView class.

Properties

AutoHideScrollBars

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

Host

Get or sets the view that host this ScrollBarView

IsVertical

If set to true this is a vertical scrollbar, otherwise, the scrollbar is horizontal.

KeepContentAlwaysInViewport

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

OtherScrollBarView

Represent a vertical or horizontal ScrollBarView other than this.

Position

The position, relative to Size, to set the scrollbar at.

ShowScrollIndicator

Gets or sets the visibility for the vertical or horizontal scroll indicator.

Size

The size of content the scrollbar represents.

Methods

OnChangedPosition()

Virtual method to invoke the ChangedPosition action event.

OnDrawingContent()

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

OnMouseEvent(MouseEventArgs)

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

Refresh()

Only used for a hosted view that will update and redraw the scrollbars.

Events

ChangedPosition

This event is raised when the position on the scrollbar has changed.