Show / Hide Table of Contents

    Class ScrollBarView

    ScrollBarViews are views that display a 1-character scrollbar, either horizontal or vertical
    Inheritance
    System.Object
    Responder
    View
    ScrollBarView
    Implements
    System.IDisposable
    System.Collections.IEnumerable
    System.ComponentModel.ISupportInitializeNotification
    System.ComponentModel.ISupportInitialize
    Inherited Members
    View.Added
    View.Removed
    View.Enter
    View.Leave
    View.MouseEnter
    View.MouseLeave
    View.MouseClick
    View.HotKey
    View.HotKeySpecifier
    View.Driver
    View.Subviews
    View.TabIndexes
    View.TabIndex
    View.TabStop
    View.CanFocus
    View.Id
    View.IsCurrentTop
    View.WantMousePositionReports
    View.WantContinuousButtonPressed
    View.Frame
    View.GetEnumerator()
    View.LayoutStyle
    View.Bounds
    View.X
    View.Y
    View.Width
    View.Height
    View.SuperView
    View.SetNeedsDisplay()
    View.SetNeedsDisplay(Rect)
    View.ChildNeedsDisplay()
    View.Add(View)
    View.Add(View[])
    View.RemoveAll()
    View.Remove(View)
    View.BringSubviewToFront(View)
    View.SendSubviewToBack(View)
    View.SendSubviewBackwards(View)
    View.BringSubviewForward(View)
    View.Clear()
    View.Clear(Rect)
    View.ScreenToView(Int32, Int32)
    View.ClipToBounds()
    View.SetClip(Rect)
    View.DrawFrame(Rect, Int32, Boolean)
    View.DrawHotString(ustring, Attribute, Attribute)
    View.DrawHotString(ustring, Boolean, ColorScheme)
    View.Move(Int32, Int32)
    View.PositionCursor()
    View.HasFocus
    View.OnAdded(View)
    View.OnRemoved(View)
    View.OnEnter(View)
    View.OnLeave(View)
    View.Focused
    View.MostFocused
    View.ColorScheme
    View.AddRune(Int32, Int32, Rune)
    View.ClearNeedsDisplay()
    View.DrawContent
    View.OnDrawContent(Rect)
    View.SetFocus(View)
    View.KeyPress
    View.ProcessKey(KeyEvent)
    View.ProcessHotKey(KeyEvent)
    View.ProcessColdKey(KeyEvent)
    View.KeyDown
    View.OnKeyDown(KeyEvent)
    View.KeyUp
    View.OnKeyUp(KeyEvent)
    View.EnsureFocus()
    View.FocusFirst()
    View.FocusLast()
    View.FocusPrev()
    View.FocusNext()
    View.LayoutStarted
    View.LayoutComplete
    View.Initialized
    View.LayoutSubviews()
    View.Text
    View.TextAlignment
    View.IsInitialized
    View.ToString()
    View.OnMouseEnter(MouseEvent)
    View.OnMouseLeave(MouseEvent)
    View.OnMouseEvent(MouseEvent)
    View.Dispose(Boolean)
    View.BeginInit()
    View.EndInit()
    Responder.Dispose()
    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, IDisposable, IEnumerable, ISupportInitializeNotification, ISupportInitialize
    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 using Computed layout.
    Declaration
    public ScrollBarView()

    ScrollBarView(Int32, Int32, Boolean)

    Initializes a new instance of the ScrollBarView class using Computed layout.
    Declaration
    public ScrollBarView(int size, int position, bool isVertical)
    Parameters
    Type Name Description
    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.

    ScrollBarView(Rect)

    Initializes a new instance of the ScrollBarView class using Absolute layout.
    Declaration
    public ScrollBarView(Rect rect)
    Parameters
    Type Name Description
    Rect rect Frame for the scrollbar.

    ScrollBarView(Rect, Int32, Int32, Boolean)

    Initializes a new instance of the ScrollBarView class using Absolute layout.
    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. Sets the Size property.
    System.Int32 position The position within this scrollbar. Sets the Position property.
    System.Boolean isVertical If set to true this is a vertical scrollbar, otherwise, the scrollbar is horizontal. Sets the IsVertical property.

    Fields

    ChangedPosition

    This event is raised when the position on the scrollbar has changed.
    Declaration
    public Action ChangedPosition
    Field Value
    Type Description
    System.Action

    Properties

    IsVertical

    If set to true this is a vertical scrollbar, otherwise, the scrollbar is horizontal.
    Declaration
    public bool IsVertical { get; set; }
    Property Value
    Type Description
    System.Boolean

    Position

    The position, relative to Size, to set the scrollbar at.
    Declaration
    public int Position { get; set; }
    Property Value
    Type Description
    System.Int32 The position.

    Size

    The size of content the scrollbar represents.
    Declaration
    public int Size { get; set; }
    Property Value
    Type Description
    System.Int32 The size.
    Remarks
    The Size is typically the size of the virtual content. E.g. when a Scrollbar is part of a ScrollView the Size is set to the appropriate dimension of ContentSize.

    Methods

    MouseEvent(MouseEvent)

    Declaration
    public override bool MouseEvent(MouseEvent me)
    Parameters
    Type Name Description
    MouseEvent me
    Returns
    Type Description
    System.Boolean
    Overrides
    Responder.MouseEvent(MouseEvent)

    Redraw(Rect)

    Declaration
    public override void Redraw(Rect region)
    Parameters
    Type Name Description
    Rect region
    Overrides
    View.Redraw(Rect)

    Implements

    System.IDisposable
    System.Collections.IEnumerable
    System.ComponentModel.ISupportInitializeNotification
    System.ComponentModel.ISupportInitialize
    Back to top Generated by DocFX