menu

WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class ScrollBarWrapper - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class ScrollBarWrapper

    ScrollbarWrapper manages scrollbars for a control and hides details about the scrollbar from the control that utilizes ScrollBarWrapper. This allows you to replace the concrete ScrollBar with Syncfusion.Windows.Forms.ReflectScrollBar, FlatScrollBar, System.Windows.Forms.ScrollBar or any custom scrollbar implementation.

    Inheritance
    System.Object
    ScrollBarWrapper
    Implements
    System.IDisposable
    IScrollBarContainer
    IScrollBar
    Inherited Members
    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)
    System.Object.ToString()
    Namespace: Syncfusion.Windows.Forms
    Assembly: Syncfusion.Shared.Base.dll
    Syntax
    public class ScrollBarWrapper : IDisposable, IScrollBarContainer, IScrollBar

    Constructors

    ScrollBarWrapper(Control, ScrollBars)

    Overloaded. Initializes a new instance of the ScrollBarWrapper class.

    Declaration
    public ScrollBarWrapper(Control parent, ScrollBars sbType)
    Parameters
    Type Name Description
    System.Windows.Forms.Control parent

    The parent control.

    System.Windows.Forms.ScrollBars sbType

    The scrollbar type: horizontal or vertical.

    ScrollBarWrapper(Control, ScrollBars, Control)

    Initializes a new instance of the ScrollBarWrapper class.

    Declaration
    public ScrollBarWrapper(Control parent, ScrollBars sbType, Control scrollBar)
    Parameters
    Type Name Description
    System.Windows.Forms.Control parent

    The parent control.

    System.Windows.Forms.ScrollBars sbType

    The scrollbar type: horizontal or vertical.

    System.Windows.Forms.Control scrollBar

    The scrollbar object to be managed by this instance.

    Properties

    Enabled

    Gets / sets a number that represents the current position of the scroll box on the scroll bar control.

    Declaration
    public bool Enabled { get; set; }
    Property Value
    Type
    System.Boolean

    InnerScrollBar

    Gets / sets a reference to the scrollbar that is contained in this wrapper class.

    Declaration
    public Control InnerScrollBar { get; set; }
    Property Value
    Type
    System.Windows.Forms.Control

    IsEmpty

    True if this is a Reflecting scrollbar; False if it is a simple scrollbar.

    Declaration
    public bool IsEmpty { get; }
    Property Value
    Type
    System.Boolean

    IsFlat

    True if this is a flat scrollbar; False if it is a simple scrollbar.

    Declaration
    public bool IsFlat { get; }
    Property Value
    Type
    System.Boolean

    IsReflect

    True if this is a Reflecting scrollbar; False if it is a simple scrollbar.

    Declaration
    public bool IsReflect { get; }
    Property Value
    Type
    System.Boolean

    IsThumbTracking

    True if scroll bar is currently in thumb drag mode.

    Declaration
    public bool IsThumbTracking { get; }
    Property Value
    Type
    System.Boolean

    LargeChange

    Gets / sets a value to be added to or subtracted from the value of the property when the scroll box is moved a large distance.

    Declaration
    public int LargeChange { get; set; }
    Property Value
    Type
    System.Int32

    Locked

    Indicates whether updating is locked. See BeginUpdate().

    Declaration
    public bool Locked { get; }
    Property Value
    Type
    System.Boolean

    Maximum

    Gets / sets the upper limit of values of the scrollable range.

    Declaration
    public int Maximum { get; set; }
    Property Value
    Type
    System.Int32

    Minimum

    Gets / sets the lower limit of values of the scrollable range.

    Declaration
    public int Minimum { get; set; }
    Property Value
    Type
    System.Int32

    Parent

    Returns a reference to the parent control.

    Declaration
    public Control Parent { get; }
    Property Value
    Type
    System.Windows.Forms.Control

    RightToLeft

    Declaration
    public RightToLeft RightToLeft { get; set; }
    Property Value
    Type
    System.Windows.Forms.RightToLeft

    SmallChange

    Gets / sets the value to be added to or subtracted from the value of the property when the scroll box is moved a small distance.

    Declaration
    public int SmallChange { get; set; }
    Property Value
    Type
    System.Int32

    SupportsScrollTips

    Indicates whether the parent control should show ScrollTips while the user is dragging a scrollbar thumb.

    Declaration
    public bool SupportsScrollTips { get; set; }
    Property Value
    Type
    System.Boolean
    Remarks

    ScrollControl Checks this property to determine if ScrollTips should be displayed.

    SupportsThumbTrack

    Indicates whether the control should scroll while the user is dragging a scrollbar's thumb.

    Declaration
    public bool SupportsThumbTrack { get; set; }
    Property Value
    Type
    System.Boolean

    Value

    Gets / sets a numeric value that represents the current position of the scroll box on the scroll bar control.

    Declaration
    public int Value { get; set; }
    Property Value
    Type
    System.Int32

    Methods

    BeginUpdate()

    Suspends updating the scrollbar until EndUpdate() is called.

    Declaration
    public void BeginUpdate()

    CopyTo(ScrollBarWrapper)

    Copies all information to another ScrollBarWrapper object.

    Declaration
    public void CopyTo(ScrollBarWrapper target)
    Parameters
    Type Name Description
    ScrollBarWrapper target

    The ScrollBarWrapper to receive all copied information.

    Dispose()

    Implements the System.IDisposable.Dispose() method and releases all managed resource for this object.

    Declaration
    public void Dispose()

    EndUpdate()

    Resumes updating the scrollbar after a BeginUpdate() call.

    Declaration
    public void EndUpdate()

    FetchScrollBar()

    Fetches scrollbar information from the managed scrollbar object and updates the information in the ScrollBarWrapper object.

    Declaration
    public void FetchScrollBar()

    InitScrollBar()

    Applies scrollbar information to the managed scrollbar object based on the information in the current ScrollBarWrapper object.

    Declaration
    public void InitScrollBar()

    ReflectScrollMessage(ref Message)

    Call this for reflected scrollbars from your parent control's System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message@) method if you want to support reflected scrollbars (those window scrollbars that you enable with WS_VSCROLL and WS_HSCROLL window styles).

    Declaration
    public void ReflectScrollMessage(ref Message m)
    Parameters
    Type Name Description
    System.Windows.Forms.Message m

    The System.Windows.Forms.Message that was passed as argument to System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message@).

    SendScrollMessage(ScrollEventType)

    Sends or emulates a scroll event.

    Declaration
    public void SendScrollMessage(ScrollEventType et)
    Parameters
    Type Name Description
    System.Windows.Forms.ScrollEventType et

    Events

    Scroll

    Occurs when the scroll box has been moved by either a mouse or keyboard action.

    Declaration
    public event ScrollEventHandler Scroll
    Event Type
    Type
    System.Windows.Forms.ScrollEventHandler

    ValueChanged

    Occurs when the System.Windows.Forms.ScrollBar.Value property has changed, either by a System.Windows.Forms.ScrollBar.Scroll event or programmatically.

    Declaration
    public event EventHandler ValueChanged
    Event Type
    Type
    System.EventHandler

    Explicit Interface Implementations

    IScrollBar.UpdateScrollInfo()

    Declaration
    void IScrollBar.UpdateScrollInfo()

    IScrollBarContainer.ScrollBar

    Declaration
    Control IScrollBarContainer.ScrollBar { get; set; }
    Returns
    Type
    System.Windows.Forms.Control

    Implements

    System.IDisposable
    IScrollBarContainer
    IScrollBar
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved