ComponentOne Window for ASP.NET AJAX: Window for ASP.NET AJAX Task-Based Help > Customizing the Dialog Window > Adding Keyboard Support

Adding Keyboard Support

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

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

In Source View

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

<cc1:C1Window ID="C1Window1" runat="server" AccessKey="w">

    <CaptionButtons>

        <CollapseExpandButton Visible="False" />

        <CloseButton Visible="True" />

        <Icon Visible="True" />

        <MaximizeButton Visible="True" />

        <MinimizeButton Visible="True" />

        <PinButton Visible="False" />

        <ReloadButton Visible="False" />

    </CaptionButtons>

</cc1:C1Window>

In Design View

In Design view select the C1Window control and in the Properties window set the C1Window.AccessKey property to w.

In Code

Add the following code to the Page_Load event to set the C1Window.AccessKey property to w:

      Visual Basic

Me.C1Window1.AccessKey = "w"

      C#

this.C1Window1.AccessKey = "w";


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