ComponentOne SuperPanel for ASP.NET AJAX: SuperPanel for ASP.NET AJAX Quick Start > Step 3 of 4: Creating a Mixed Scroll Mode in Code

Step 3 of 4: Creating a Mixed Scroll Mode in Code

C1SuperPanel provides four scrolling modes: ScrollBar, ScrollButton, ScrollButtonsHover and EdgeHover. Any of the four scrolling modes can be combined to make a mixed mode. In the following steps you will create a mixed scroll mode for C1SuperPanel. The following steps assume you've completed the Step 2 of 4: Adding Content to the C1SuperPanel Control topic.

1.   Delcare the C1.Web.UI.Controls.C1SuperPanel and C1.Web.UI.Controls.C1SuperPanel.BehaviorSettings namespace directives in your code file at the top of the page.

      Visual Basic

Imports C1.Web.UI.Controls.C1SuperPanel

Imports C1.Web.UI.Controls.C1SuperPanel.BehaviorSettings

      C#

using C1.Web.UI.Controls.C1SuperPanel;

using C1.Web.UI.Controls.C1SuperPanel.BehaviorSettings;

2.   In code file, add the following code to the Page_Load event to set the scroll mode of C1SuperPanel. In this case we are using scroll bar mode mixed with scroll button mode.

      Visual Basic

Me.C1SuperPanel1.PanelBehaviorSettings.HScroller.Mode = C1SuperPanelScrollMode.ScrollBar Or C1SuperPanelScrollMode.Buttons

Me.C1SuperPanel1.PanelBehaviorSettings.VScroller.Mode = C1SuperPanelScrollMode.ScrollBar Or C1SuperPanelScrollMode.Buttons

      C#

this.C1SuperPanel1.PanelBehaviorSettings.HScroller.Mode = C1SuperPanelScrollMode.ScrollBar | C1SuperPanelScrollMode.Buttons;

this.C1SuperPanel1.PanelBehaviorSettings.VScroller.Mode = C1SuperPanelScrollMode.ScrollBar | C1SuperPanelScrollMode.Buttons;

 

3.   Press F5 to run the application and observe the arrow buttons and scrollbars that appear for the horizontal and vertical scrolling. Also notice when you click or hover over the scroll buttons or use the scrollbars the horizontal or vertical scrolling is performed.

 

 

In this step you customized the horizontal and vertical scroll settings of the controls. For more information about the different scroll setting values see SuperPanel Scroll Settings. In the next step you'll add animation effects to the controls.


Send comments about this topic to ComponentOne.
Copyright © 1987-2010 ComponentOne LLC. All rights reserved.