Original Publication Date: 1994-Feb-01
Included in the Prior Art Database: 2005-Mar-26
Jones, CA: AUTHOR [+1]
This design details an algorithm for arranging the tabstop of controls in a dialog box. The tabstop ordering of controls is currently a manual task. The process is order logN and produces the same results as would a person manually.
details an algorithm for arranging the tabstop of
controls in a dialog box. The tabstop ordering of controls is
currently a manual task. The process is order logN and produces the
same results as would a person manually.
The algorithm is as follows:
In the IBM
OS/2* Presentation Manager environment the origin
for the X/Y coordinate system is the bottom left corner. Controls
near the top of the screen have higher Y values, and controls near
the left side of the screen have lower X values, as in any Cartesian
coordinate system. It is assumed that the most likely tabstop order
would be to visit controls near the top of the screen first, working
down to the bottom left corner. Controls that have the same Y
coordinate should be visited left-to-right.
implementation of this heuristic is simply to sort the
controls by their Y/X coordinates, using Y as the major key and X as
the minor key, and performing a descending sort on Y.
may fail for controls placed inside group boxes,
since the window designer's intention may be to work down before
moving across to the right. For those situations, the algorithm is
called again recursively for a tabstop sequence of the group box
controls. The sorting order of this algorithm can be changed to fit
the coordinate system. For example, if the origin of the coordinate
system is top left with increasing values of Y downward the sort