C1.Win.C1FlexGrid.Util.BaseControls Namespace > ScrollableControl Class : ScrollBars Property |
'Declaration
<C1DescriptionAttribute("Gets or sets which scroll bars should appear on the control.")> <C1CategoryAttribute("Layout")> <DefaultValueAttribute()> Public Property ScrollBars As ScrollBars
'Usage
Dim instance As ScrollableControl Dim value As ScrollBars instance.ScrollBars = value value = instance.ScrollBars
[C1Description("Gets or sets which scroll bars should appear on the control.")] [C1Category("Layout")] [DefaultValue()] public ScrollBars ScrollBars {get; set;}
[C1Description("Gets or sets which scroll bars should appear on the control.")] [C1Category("Layout")] [DefaultValue()] public: property ScrollBars ScrollBars { ScrollBars get(); void set ( ScrollBars value); }
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 C1.Win.C1FlexGrid.C1FlexGridBase.BeforeScroll event and set its C1.Win.C1FlexGrid.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.
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2