Display and Hide Scroll Bars

Controlling Scroll Bar Visibility

To control scroll bar’s visibility in the GridDesktop, use the IsVerticalScrollBarVisible and IsHorizontalScrollBarVisible properties. The examples below show how to hide and show scroll bars.

Programming Samples: Hiding Scroll Bars

To hide scrollbars, set the properties that control visibility to false.

// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET
// Hiding the vertical scroll bar
gridDesktop1.IsVerticalScrollBarVisible = false;
// Hiding the horizontal scroll bar
gridDesktop1.IsHorizontalScrollBarVisible = false;

Programming Samples: Making Scroll Bars Visible

To make scrollbars visible, set the properties that control visibility to true.

// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET
// Displaying the vertical scroll bar
gridDesktop1.IsVerticalScrollBarVisible = true;
// Displaying the horizontal scroll bar
gridDesktop1.IsHorizontalScrollBarVisible = true;