White Light Computing, Inc.
Guiding your Information Technology investment toward success!


Tab Order Builder and Toggler
(VFP 9/8/7/6)

WLC Tab Order Builder v2.0.38  (wlctaborderbuilder.zip - 48KB)

(Updated 19-Aug-2004)

 

Tab Order Toggler v1.0  (tabordertoggler.zip - 1KB)

(Posted 8-Feb-2004)

"I like the configuration options, especially the VFP 9.0 ones.  I also really like the fact that the window can be re-sized.  ... This is really an invaluable tool since it allows me to choose either the interactive or list on the fly.  I usually use the interactive when I first set up a screen (using Visual FoxExpress) but always use the Tab Builder when I edit screens.  Saves a lot of time.  Again, thanks for the great tools!"
- Joe Alper

Even better, get WLC's tab order builder. It rocks!
- Randy Jean, Orion Group

Have you ever been annoyed by the native Visual FoxPro Tab Order dialog (fixed in VFP 9)? This is the dialog that you can use to move objects up and down the list to change the tab order within the Form or Class Designer. If you have long object names they get truncated and when you move an object up or down the list the icons for the objects you pass over are changed to the object you are moving. Is this a bug in VFP? Absolutely, and it has been there for many versions.

Now some developers prefer the interactive style of setting tab orders and have not used the "By List" style for years either because they find it annoying or they prefer the interactive mode. I prefer using both, each under different circumstances. The interactive version is great when you need to adjust most or all of the tab orders after initially developing the form or class. I prefer the list when I need to adjust a couple of items. If only one or two items out of 20 or more need to be changed it can be time consuming to change them all. Up to and including VFP 7, you could not tell which object you are currently on and if distracted during the setting, you likely needed to start over (VFP 8/9 now highlights which object you last set).

So I created the WLC Tab Order Builder to eliminate the need to use the "By List" tab order dialog in VFP. It does everything the native dialog does and more. Here are a list of advantages:

  • Resizeable - you can see those long names (are you a Visual FoxExpress developer? <g>)
  • Indicates the current tab order as well as the original order before you moved the object.
  • Displays the object name of the container currently getting the tab order set (this is displayed just above the listbox).
  • No icon changing when you move objects up and down the list.
  • Shows a count of the objects in the list
  • Restores the form size and position where you left it the last time you used it. You can turn this feature off if you like on the configuration page.
  • Configuration page allows you to control whether errors are logged and where they are logged, if themes are used (VFP 8 and higher), and whether the configuration is saved on exit.
  • The about page has hyperlinks to the various Web sites that this tool is available on and has a commandbutton to view any logged errors.
  • Runs as a VFP Builder (using Builder technology) or as a standalone program from a menu (see details below).

This tool is a VFP Builder (ALL and PAGE builder). To register this tool as a builder run the executable and pass it .T. as a parameter. Unfortunately the PAGE builder is not working in VFP (any version, including VFP 8 SP1 and VFP 9), but the ALL builder kicks in.

CD < folder where the tool is located >
DO WLCTabOrderBuilder.exe WITH .T.

WORD OF CAUTION: VFP has a quirk in it if you only have one ALL builder. What will happen is that the only ALL builder will be run for any object that does not have any other builders registered. For instance, you do not have a SPINNER builder registered, the ALL builder will automatically run when you right-click on a spinner object and select Builder...  This might not be what you want. I always recommend having two or more ALL builders so you can select which one runs or cancel if you really do not want a ALL builder running for the object you selected.

If you want to run the WLC Tab Order Builder from a menu (ideal for Visual FoxExpress developers since each VFE object has a specific builder and VFP builders are not currently accessible in the VFE development environment), you can add it to a custom developer menu or one of the VFP menu pads:

DEFINE BAR 19 OF geeks PROMPT "WLC Tab Order Builder" ;
     SKIP FOR !FILE("J:\WLCProject\Tools\WLCTabOrderBuilder.exe") ;
     MESSAGE "J:\WLCProject\Tools\WLCTabOrderBuilder.exe"

ON SELECTION BAR 19 OF geeks DO J:\WLCProject\Tools\WLCTabOrderBuilder.exe

Naturally you will need to replace the directories I have established.

This is ideal if your objects have a Builder or BuilderX property set. The builder defined in these properties always takes precedence to the builders registered in the Builder.dbf table. This is the situation that Visual FoxExpress developers face or objects included in your applications from the Fox Foundation Classes (FFC).

The builder will run for the currently selected object. If the object is a container it will present all the objects in the container. If it is not an object that contains other objects, then the builder will present the objects in the container that the selected object is in.

Issues

There is two quirks/issues with this tool. The first is with page objects. If you have a page in a pageframe, right-click on the page and select builder you will get a message "This builder cannot find a selected control with an appropriate base class." This message is getting displayed from Builder.app (the native Builder Manager application that controls the execution of builders). It basically fails with page objects. I have reported this to the VFP team as a bug and they are looking into it.

The second issue that exists is that OLEControls show up in the VFP Tab Order dialog and not in the WLC Tab Order Builder. The way this tool works is that it looks for the TabIndex property on the object. If the object does not have a TabIndex property it is skipped since it has no tab order associated with the object. The OLEControl does not have this property. I am not sure how the VFP team is handling this internally, but I am going to pursue it with them when I get a chance.

Updates

Version 2.0 Fixes and Enhancements
Released 23-May-2004
Bug Fix: Made sure the tool is not executed outside of VFP IDE.
Bug Fix: Object Count textbox no longer TabStop-able and is moved next to the About tab so it is viewable even when the form is resized.
Converted all source code to White Light Computing, removing G2 references.
Version 1.0 Fixes and Enhancements
Released 9-Oct-2003
First release of this tool, everything is new.

Tab Order Toggler

The toggler program (TogglerTabOrder.prg) will change the registry entry so the Tab Order will be either Interactive or via the By List dialog. It changes it to the one it currently is not. The reason I created this is that the Visual FoxExpress development environment is modal and the VFP Options dialog is not available, but can save all VFP developers time hunting down the setting in the Options dialog. This little program can be attached to a menu and executed to avoid going to the VFP Options dialog, selecting the Forms page and making the change. This program has a dependency for the Registry Fox Foundation Class which is installed with Visual FoxPro. The registry entry changed is:

HKEY_CURRENT_USER\Software\Microsoft\VisualFoxPro\<vfp version>\Options\TabOrdering

The program finds the appropriate registry entry for the specific version of Visual FoxPro.


       
Trouble with the menu? Try this site map.

Send mail to with questions or comments about this Web site.
Copyright © 2004-2020  White Light Computing, Inc.
All Rights Reserved Worldwide
White Light Computing Privacy Statement
Last modified: 07.29.2020