Version

Scrollbars Enumeration

Specifies if vertical and/or horizontal scrollbars will be shown
Syntax
'Declaration
 
Public Enum Scrollbars 
   Inherits System.Enum
public enum Scrollbars : System.Enum 
Members
MemberDescription
Automaticdisplay either scroll bar as necessary
Bothshow both horizontal and vertical scroll bars
Horizontalshow horizontal scroll bar only
Noneno scroll bars are to be shown
Verticalshow vertical scroll bar only
Example
Following code sets some of the properties related to scrollbars in the UltraGrid.

Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinGrid

  Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button1.Click
      ' Set the scroll style to Immediate so the UltraGrid scrolls the rows immediately
      ' as soon as the user drags the thumb rather than waiting untill the scroll thumb is
      ' released.
      Me.UltraGrid1.DisplayLayout.ScrollStyle = ScrollStyle.Immediate

      ' Scrollbars indicates which of the vertical and horizontal scrollbars if any gets 
      ' shown and how.
      Me.UltraGrid1.DisplayLayout.Scrollbars = Scrollbars.Both

      ' Setting ScrollBounds to ScrollToFill will prevent the user from scrolling further
      ' down as soon as the last row is fully visible.
      Me.UltraGrid1.DisplayLayout.ScrollBounds = ScrollBounds.ScrollToFill

      ' If you want to prevent the row selectors from scrolling out of view when you 
      ' horizontally scroll columns set the UseFixedHeaders to true. This enables the 
      ' fixed headers functionality which also allows the user to freeze/unfreeze
      ' columns.
      Me.UltraGrid1.DisplayLayout.UseFixedHeaders = True

      ' Set verious scrollbar related properties using ScrollBarLook object returned
      ' by ScrollBarLook property.
      Me.UltraGrid1.DisplayLayout.ScrollBarLook.MinMaxButtonsVisible = True

      ' Set the style of the scroll bar arrows.
      Me.ultraGrid1.DisplayLayout.ScrollBarLook.ScrollBarArrowStyle = _
          Infragistics.Win.UltraWinScrollBar.ScrollBarArrowStyle.BothAtRightBottom

      ' Set appearances for various ui elements of the scroll bar.
      Me.UltraGrid1.DisplayLayout.ScrollBarLook.Appearance.ThemedElementAlpha = Alpha.Transparent
      Me.UltraGrid1.DisplayLayout.ScrollBarLook.Appearance.BackColor = Color.Silver
      Me.UltraGrid1.DisplayLayout.ScrollBarLook.Appearance.BackColor2 = Color.SkyBlue
      Me.UltraGrid1.DisplayLayout.ScrollBarLook.Appearance.BackGradientStyle = GradientStyle.Vertical

      Me.UltraGrid1.DisplayLayout.ScrollBarLook.ButtonAppearance.ThemedElementAlpha = Alpha.Transparent
      Me.UltraGrid1.DisplayLayout.ScrollBarLook.ButtonAppearance.BackColor = Color.Blue
      Me.UltraGrid1.DisplayLayout.ScrollBarLook.ButtonAppearance.ForeColor = Color.LightYellow

      ' When true, scroll notifications as a result of a scroll arrow or scroll track click 
      ' will occur synchronously thus giving scrolling higher priority when cpu intensive
      ' tasks are being performed.
      Me.UltraGrid1.DisplayLayout.PriorityScrolling = True
  End Sub
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinGrid;
using System.Diagnostics;

private void button1_Click(object sender, System.EventArgs e)
{
	// Set the scroll style to Immediate so the UltraGrid scrolls the rows immediately
	// as soon as the user drags the thumb rather than waiting untill the scroll thumb is
	// released.
	this.ultraGrid1.DisplayLayout.ScrollStyle = ScrollStyle.Immediate;

	// Scrollbars indicates which of the vertical and horizontal scrollbars if any gets 
	// shown and how.
	this.ultraGrid1.DisplayLayout.Scrollbars = Scrollbars.Both;

	// Setting ScrollBounds to ScrollToFill will prevent the user from scrolling further
	// down as soon as the last row is fully visible.
	this.ultraGrid1.DisplayLayout.ScrollBounds = ScrollBounds.ScrollToFill;

	// If you want to prevent the row selectors from scrolling out of view when you 
	// horizontally scroll columns set the UseFixedHeaders to true. This enables the 
	// fixed headers functionality which also allows the user to freeze/unfreeze
	// columns.
	this.ultraGrid1.DisplayLayout.UseFixedHeaders = true;

	// Set verious scrollbar related properties using ScrollBarLook object returned
	// by ScrollBarLook property.
	this.ultraGrid1.DisplayLayout.ScrollBarLook.MinMaxButtonsVisible = true;

	// Set the style of the scroll bar arrows.
	this.ultraGrid1.DisplayLayout.ScrollBarLook.ScrollBarArrowStyle = 
		Infragistics.Win.UltraWinScrollBar.ScrollBarArrowStyle.BothAtRightBottom;

	// Set appearances for various ui elements of the scroll bar.
	this.ultraGrid1.DisplayLayout.ScrollBarLook.Appearance.ThemedElementAlpha = Alpha.Transparent;
	this.ultraGrid1.DisplayLayout.ScrollBarLook.Appearance.BackColor = Color.Silver;
	this.ultraGrid1.DisplayLayout.ScrollBarLook.Appearance.BackColor2 = Color.SkyBlue;
	this.ultraGrid1.DisplayLayout.ScrollBarLook.Appearance.BackGradientStyle = GradientStyle.Vertical;
				
	this.ultraGrid1.DisplayLayout.ScrollBarLook.ButtonAppearance.ThemedElementAlpha = Alpha.Transparent;
	this.ultraGrid1.DisplayLayout.ScrollBarLook.ButtonAppearance.BackColor = Color.Blue;
	this.ultraGrid1.DisplayLayout.ScrollBarLook.ButtonAppearance.ForeColor = Color.LightYellow;

	// When true, scroll notifications as a result of a scroll arrow or scroll track click 
	// will occur synchronously thus giving scrolling higher priority when cpu intensive
	// tasks are being performed.
	this.ultraGrid1.DisplayLayout.PriorityScrolling = true;
}
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, 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

See Also