ComponentOne Accordion for ASP.NET AJAX: Accordion for ASP.NET AJAX Task-Based Help > Adding Keyboard Accessibility Support to C1Accordion

Adding Keyboard Accessibility Support to C1Accordion

You can make C1Accordion and each of its C1AccordionPanes accessible through the keyboard by setting the AccessKey property.

To set the access key using the Accordion Designer Form:

1.   Click the C1Accordion smart tag to open the C1Accordion Tasks menu.

2.   Select Edit Panes and choose C1Accordion1 in the Accordion Designer Form. Note that you can also add keyboard access to each of the C1AccordionPanes.

3.   Enter the desired letter next to the AccessKey property.

4.   Click OK to close the Accordion Designer Form. When you run the project and press the ALT key plus the letter key entered in the previous step, C1Accordion1 gets the focus.

To set the access key programmatically:

Add the following code to your form:

      Visual Basic

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        C1Accordion1.AccessKey = "M"

End Sub

      C#

protected void Page_Load(object sender, EventArgs e)

    {

        C1Accordion1.AccessKey = "M";

    }


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