Browse Prior Art Database

Tabstop Algorithm

IP.com Disclosure Number: IPCOM000111209D
Original Publication Date: 1994-Feb-01
Included in the Prior Art Database: 2005-Mar-26
Document File: 2 page(s) / 37K

Publishing Venue

IBM

Related People

Jones, CA: AUTHOR [+2]

Abstract

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.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 84% of the total text.

Tabstop Algorithm

      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.

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.

      The 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.

      The heuristic 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
order coul...