![]() |
|
|
|
An effective InfoView must be as keyboard-friendly as it can be. To Designer, this means two things:
The Tab Order and Label's Accelerators are two independent mechanisms that make navigation of the form easier using the keyboard – even in this day and age of the reign of the Mouse.
The Tab Order is so obvious, yet it is often overlooked even in some very serious applications. Tab Order is the order in which the focusable items on an InfoView form are "visited" when one clicks the Tab key. To adjust the Tab Order, Designer offers you not one, but two methods.
You can use the above procedure on a subset of items. For example, if you have items that currently have the incorrect tab order A, C, D, B, E, F, ..., you could re-arrange the order of just the C, D, B group by selecting these 3 items in the right order B, C, D, and clicking the Tab Order Direct button.
The above "direct" procedure may work well for relatively simple InfoViews, but sometimes you may wish you had a way to just see what the current Tab Order is and make small adjustments to it. Your wish is our command, and the second method of setting Tab Order offers you precisely that and then some. But before we delve into it, let's discuss a little Tab Order problem.
Tab Order and Containers. The problem is this: Tab Order works within Containers. That sounded menacing but not very clear, so let us explain.
What you cannot do, is persuade the form to make the Tab key move the focus directly from one Panel's Edit Box to an Edit Box of the other Panel – in a zigzag fashion. You have to go through all items of one Panel, and only then are you allowed to move on to the next Panel. As a matter of fact, you may never notice this because Panels themselves do not receive focus, but Panels (and other Containers) have a particular Tab Order associated with them – just as Text Boxes and some other focusable items do.
We had to mention the above problem or issue simply because you are very likely to quickly run into this limitation, and get upset, annoyed, confused, and perhaps even become quite rude with your computer. There's little reason for any of the above though. For one thing, if some items end up grouped together in the fashion we have illustrated above, it's not all that dreadful if Tab navigation between them works in "columns" order instead of the admittedly more natural zigzag one. Secondly, there's a solution even for this insurmountable problem. If you absolutely insist on the zigzag Tab Order, just place the 6 Edit Boxes on 6 Panels! It may seem like too much trouble and in most cases it probably is.
The list shows all focusable items of the InfoView in a grid with the following columns:
Adjusting the Tab Order is as simple as drag-reordering the corresponding records of the grid: just drag the ones you want where you want them. You can drag more than one item at a time. And this is when you need to remember the Tab Order / Container limitation we have described earlier. The list displays all items and, alas, allows you to re-order them whichever way you want, including a zigzag fashion that will not work. Applying such an "illegal" Tab Order will essentially make Designer do its best to make it "legal", i.e., it will attempt to honor it the best it can while complying with the Tab Order within Container rule. This will produce the effect of the Containers being visited in the order in which their first child item has been listed by you. If you would like to make sure you are looking at a proper "legal" Tab Order, it is your responsibility to list child items consecutively "within" their parent Container. As we said, this is not important to be able to set the best reasonable Tab Order, but you may want to do it this way simply to avoid surprises.
Label's Accelerators. A Label has secret powers. Well, at least one: it can focus an item. For this to work, two things must be set up:
The Label column does not indicate if a given Label has a valid Accelerator character. You can verify and adjust the Accelerators directly in the InfoView by editing item Captions as necessary. An item, such as a Checkbox, that has its own Caption can usually focus itself with no need for a Label's help. Labels that are auto-created when you create items based on fields are pre-set to focus their corresponding item. You can edit this for any label if necessary: there's nothing else that makes these default Labels "special". If you ever want to have a Label with a literal ampersand character, you must double it up so that it is not interpreted as an Accelerator "marker". For example, you could create a Caption "Cats && D&ogs" which would be displayed as "Cats & Dogs".
Accelerator Conflicts. You must watch out for two possible sources of conflicts between Accelerator characters. One is within the same InfoView. No two items should have the same Accelerator. If they do, it is most likely that only one of them will work. The second source of conflicts is the main menu of the application. If both the menu and an InfoView end up with the same Accelerator character, the menu "wins", and the InfoView's one is ignored. Since InfoViews and Accelerators are conceived to work in Alventis, it is Alventis' main menu you should be worried about – not Designer's. Since nobody will prevent you from setting a wrong Accelerator, you have to approach this systematically. Start by making a list of Accelerators taken by Alventis' menu (E F G H I O T U V W). You can now assign unused letters to your Captions. You can also use numbers or whatever else is accessible with the Alt key: if you "run out" of all the common stuff, you can even venture into such exotic Accelerators as the dollar sign "$" and similar. One would have to invoke these with both the Alt and Shift keys though: Alt-$ is equivalent to Alt-Shift-4, for example. Note that you can't use this trick to distinguish between uppercase and lowercase letters. In closing, here's a little tip on how you might proceed with your Accelerator choices: start with the shortest Captions with the most common letters on the one hand, and with the most infrequently used letters (in all Captions) on the other – and attack the problem from both of these directions. You'll see why this makes sense when you start assigning Accelerators to your 27 items... |