Tab Order Builder and Toggler
"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
- 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
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
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:
19 OF geeks PROMPT "WLC
Tab Order Builder" ;
SKIP FOR !FILE("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.
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.
Version 2.0 Fixes and Enhancements
|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
|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:
The program finds the appropriate registry entry for the specific version of