Syncfusion.Shared.Base
Members 


Syncfusion.Windows.Forms Namespace : ScrollControl Class

ScrollControl Class

Defines a base class for custom controls that support scrolling behavior.
Object Model
ScrollControl ClassIMouseController InterfaceDoubleBufferSurface ClassScrollBarWrapper ClassMetroColorTable ClassMouseControllerDispatcher ClassMetroColorTable ClassMetroColorTable ClassMetroColorTable ClassMetroColorTable ClassScrollTipWindow ClassScrollerVisualStyle ClassScrollBarWrapper Class
Syntax
Remarks
The ScrollControl class acts as a base class for controls that require the ability to scroll. To allow a control to display scrollbars as needed, set the AutoScroll property to True. To select which scrollbars should be visible, set the VScroll and HScroll properties.

You can also associate stand-alone scrollbars with the ScrollControl. The VertScrollBar and HorizScrollBar properties allow you to associate external scrollbars. This is of benefit if you want to share one scrollbar with a parent control. For example, if the ScrollControl is a view inside a workbook or dynamic splitter frame.

ScrollControl supports automatic scrolling when the user drags the mouse. In a grid when the user starts selecting cells the user can drag the mouse outside the grid area and the grid will automatically scroll. To enable auto scrolling, override the OnMouseDown event in your derived control and initialize the AutoScrolling, AutoScrollBounds and InsideScrollBounds properties.

When the user scrolls your control and holds down the mouse on the down or up arrow of the scrollbar, the scrolling speed will accelerate.

The FixRenderOrigin method will ensure correct initialization of the rendering origin for brushes and patterns. You can call FixRenderOrigin from your control's OnPaint method. ScrollControl supports scrolling with the mouse wheel and also cooperates fine with with the IntelliMouseDragScroll class.

If you want to provide context information about your control and change the cursor on the fly while the user moves the mouse, set the OverrideCursor property to the cursor you want to show. Instead, you can also implement IMouseController and add the object to MouseControllerDispatcher.

Inheritance Hierarchy

System.Object
   System.MarshalByRefObject
      System.ComponentModel.Component
         System.Windows.Forms.Control
            Syncfusion.Windows.Forms.Core.BaseControl
               Syncfusion.Windows.Forms.ScrollControl
                  Syncfusion.Windows.Forms.CellGrid.SfCellGrid
                  Syncfusion.Windows.Forms.Diagram.Controls.Diagram
                  Syncfusion.Windows.Forms.Grid.GridControlBase
                  Syncfusion.Windows.Forms.Tools.GroupBar
                  Syncfusion.Windows.Forms.Tools.MultiColumnTreeView.MultiColumnTreeView
                  Syncfusion.Windows.Forms.Tools.TreeViewAdv

AssemblyVersion

Syncfusion.Shared.Base: 17.3460.0.14

See Also