Spread for ASP.NET 11 Product Documentation
Displaying Scroll Bars
Spread for ASP.NET 11 Product Documentation > Developer's Guide > Customizing User Interaction > Customizing Interaction with the Overall Component > Displaying Scroll Bars

You can customize how and if to display the scroll bars in the component. You can display the individual scroll bars (horizontal or vertical) only when needed, as shown in the figure.

Scroll Bars

Using the Properties Window

  1. Select the FpSpread component.
  2. With the Properties window open, select the HorizontalScrollBarPolicy property and VerticalScrollBarPolicy (under the Behavior category) and from the drop-down list, select a value for each.
  3. The scroll bar policy is now set.

Using Code

Determine when to display the scroll bars by setting the HorizontalScrollBarPolicy property and VerticalScrollBarPolicy property for the FpSpread component and the settings of the ScrollBarPolicy enumeration.

Example

The following example sets the horizontal and vertical scroll bar policies.

C#
Copy Code
FpSpread1.HorizontalScrollBarPolicy = FarPoint.Web.Spread.ScrollBarPolicy.Always;
FpSpread1.VerticalScrollBarPolicy = FarPoint.Web.Spread.ScrollBarPolicy.AsNeeded; 
VB
Copy Code
FpSpread1.HorizontalScrollBarPolicy = FarPoint.Web.Spread.ScrollBarPolicy.Always
FpSpread1.VerticalScrollBarPolicy = FarPoint.Web.Spread.ScrollBarPolicy.AsNeeded 

Using the Spread Designer

  1. Select the Settings menu.
  2. Select the Scrollbar icon under the Spread Settings section.
  3. Set the policy options.
  4. Click OK to apply the changes.
  5. Click Apply and Exit to close the Spread Designer.