FlexGrid for WinForms | ComponentOne
C1.Win.FlexGrid.Util.BaseControls Namespace / ScrollableControl Class / ScrollBars Property

In This Topic
    ScrollBars Property (ScrollableControl)
    In This Topic
    Gets or sets which scroll bars should appear on the control.
    Syntax
    'Declaration
     
    
    Public Property ScrollBars As ScrollBars
    public ScrollBars ScrollBars {get; set;}
    Remarks

    Scroll bars are displayed only if the contents of the control extend beyond its client area. For example, if ScrollBars is set to System.Windows.Forms.ScrollBars.Horizontal, a horizontal scroll bar is displayed only if the control is not wide enough to display all columns at once.

    Even when it has no scrollbars, the control will still scroll to keep the selection visible. If you want to prevent scrolling, handle the BeforeScroll event and set its C1.Win.FlexGrid.RangeEventArgs.Cancel parameter to true.

    You can force the control to display scrollbars at all times with the ForceScrollBars property.

    You can determine which scrollbars are currently visible with the ScrollBarsVisible property.

    See Also