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

Adding Keyboard Support

The C1Expander control lets you easily add keyboard accessibility to the control. You can use AccessKey property to set how the user navigates to the control and through your user interface.

In the following examples you'll set the AccessKey property to e so that pressing the ALT+E key combination at run time brings the C1Expander control into focus.

In Source View

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

<cc1:C1Expander ID="C1Expander1" runat="server" HeaderSize="25px" Height="200px" Width="100px" AccessKey="e">

In Design View

In Design view, select the C1Expander control and in the Properties window set the AccessKey property to e.

In Code

Add the following code to the Page_Load event to set the AccessKey property to e:

      Visual Basic

Me.C1Expander1.AccessKey = "e"

      C#

this.C1Expander1.AccessKey = "e";


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