ComponentOne Slider for ASP.NET AJAX: Slider for ASP.NET AJAX Task-Based Help > Adding Keyboard Support

Adding Keyboard Support

The C1Slider control lets you easily add keyboard accessibility to the control. You can use C1Slider.AccessKey property to set how the user navigates to the control and through your user interface. At run time users can use a key combination to bring the C1Slider control into focus and can then change the Value of the control using the left and right arrow keys (if Orientation is set to Horizontal) or up and down arrow keys (if Orientation is set to Vertical).

In the following examples you'll set the C1Slider.AccessKey property to s so that pressing the ALT+S key combination at run time brings the C1Slider control into focus. Once the control is in focus, the user can use the arrow keys to change the control's Value.

In Source View

In Source view add AccessKey="s" to the <cc1:C1Slider> tag so it appears similar to the following:

<cc1:C1Slider ID="C1Slider1" runat="server" AccessKey="s" />

In Design View

In Design view select the C1Slider control and in the Properties window set the C1Slider.AccessKey property to "s".

In Code

Add the following code to the Page_Load event to set the C1Slider.AccessKey property to s:

      Visual Basic

Me.C1Slider1.AccessKey = "s"

      C#

this.C1Slider1.AccessKey = "s";


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