Archive for June, 2006

In all the excitement of adding new display modes we have to remember to add the essentials. Adding keyboard support is something that takes time to get right but for which you never get credit.

Users expect the keyboard interface to ‘just work’ and when it does they will give you no credit for it at all. Fancy graphics they will notice and praise, correct tab key processing they will not notice unless it is broken.

I think I have the key handling correct but only feedback from beta testing will confirm this. I have used the standard TabControl as the reference of the correct handling of focus and keys.

Here is the navigator when it has taken the focus because the user has clicked on the first page check button.

Here it is again when the right key is used to select the next right to the right.

When focus is placed on a check button you can change the selected page by using the Left, Right, Home and End keys. Pressing Tab when on a check button will shift focus to the first control on the currently selected page. Pressing Shift+Tab will move focus back to the check button when on the first control of the selected page.

If the focus is on the check buttons or on any control of the selected page then you can use Ctrl+Tab to move to the next page. Pressing Shift+Ctrl+Tab will select the previous page. All this handling is the same as for the standard TabControl.

One of the features found in all good TabControl implementations is the ability to act as a TabStrip.

As the KryptonNavigator is attempting to exceed the standards of a TabControl we must provide at least that level of capability when appropriate. Hence the addition of two extra modes that provide TabStrip style variations on the existing inside and outside check buttons.

The two new modes are called BarCheckButtonOnly and BarCheckButtonGroupOnly. The display for the selected page is never shown and the control has the ability to size itself correctly when defined to have AutoSize set.

Typical usage of the control would be to dock it against one of the Form/Control edges and set AutoSize to True. You can then hook into the SelectedPageChanged event and update the main part of your application as appropriate.

Here are pictures of the two modes in action.