home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1993 #2 / Image.iso / database / p4w_all.zip / TI1314.ASC < prev    next >
Text File  |  1993-04-27  |  14KB  |  463 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.   PRODUCT  :  Paradox for Windows                   NUMBER  :  1314
  9.   VERSION  :  1.0
  10.        OS  :  WIN
  11.      DATE  :  April 27, 1993                           PAGE  :  1/7
  12.  
  13.     TITLE  :  Using Tab Order With UI Objects in a Form
  14.  
  15.  
  16.  
  17.  
  18.   Intended Audience:
  19.   Anyone interested in understanding and manipulating the tab
  20.   sequence in a Paradox for Windows form.
  21.  
  22.   Prerequisites:
  23.   This document assumes that Microsoft Windows was installed
  24.   correctly.  This means that you have followed the steps in the
  25.   Windows Getting Started guide (Chapter 1), and in the Windows
  26.   User's Guide (Chapters 14, 15, and Appendix A).  If your Windows
  27.   installation does not conform to those standards, Paradox for
  28.   Windows may not be able to run successfully.  This document also
  29.   assumes you have read the Paradox for Windows Getting Started
  30.   guide, Chapters 1, 2, and 8.
  31.  
  32.   Purpose of the TI:
  33.   To enable you to control the order in which UI (User Interface)
  34.   objects contain focus by pressing [Tab] or [Shift+Tab] in a form.
  35.  
  36.  
  37.   Four different UI object types (Button, Field, Graphs, and
  38.   EditRegion) have a Tab Stop property.  For consistency, "OBJECT"
  39.   refers to any one of these three field types, whereas "object"
  40.   refers to any UI object.  [Shift+Tab] is assumed to perform the
  41.   same action as [Tab] in the reverse direction.
  42.  
  43.   This document is subdivided into three Sections:
  44.  
  45.        SECTION I      How to set/release a tab stop for an OBJECT
  46.        SECTION II     How to determine the tab sequence when
  47.                       pressing [Tab].
  48.        SECTION III    An example that demonstrates how to alter the
  49.                       natural tab sequence without using ObjectPAL
  50.                       code.
  51.  
  52.   SECTION I   How to set/release a tab stop for an OBJECT
  53.  
  54.   To set the Tab Stop property, inspect the OBJECT by clicking the
  55.   right mouse button on the OBJECT.  Then choose the Run Time | Tab
  56.   Stop property.  To release the OBJECT from the tab sequence,
  57.   repeat the above process.
  58.    
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.   PRODUCT  :  Paradox for Windows                   NUMBER  :  1314
  75.   VERSION  :  1.0
  76.        OS  :  WIN
  77.      DATE  :  April 27, 1993                           PAGE  :  2/7
  78.  
  79.     TITLE  :  Using Tab Order With UI Objects in a Form
  80.  
  81.  
  82.  
  83.  
  84.   NOTE: The Tab Stop property acts as a toggle.  When there is a
  85.         checkmark next to the Tab Stop property, Paradox will
  86.         include the OBJECT in the tab sequence of movement among
  87.         objects.  If there is no checkmark next to the Tab Stop
  88.         property, Paradox bypasses the OBJECT in the tab sequence.
  89.         In the case of Button objects, you can still use the mouse
  90.         to push the button.
  91.  
  92.   SECTION II  How to determine the tab sequence when pressing [Tab]
  93.  
  94.   As a simplified explanation, the tab sequence in a form is in the
  95.   same order which you would read a book, from left to right, top
  96.   to bottom.  But due to the graphical nature of Paradox for
  97.   Windows, the tab sequence is slightly more complicated because
  98.   objects can overlap one another, either vertically or
  99.   horizontally.
  100.  
  101.   For the sake of simplicity, this section assumes that only
  102.   objects with the Tab Stop property are on the form (Buttons,
  103.   Fields, and Graphs).  SECTION III will embellish on SECTION II,
  104.   bringing in the concept of the containership hierarchy and how it
  105.   plays a vital role in determining the tab sequence.
  106.  
  107.   When tabbing between OBJECTS, Paradox uses the following
  108.   algorithm to determine which OBJECT to move to next:
  109.  
  110.   Paradox scans from top-left to bottom right looking for an
  111.   object.  If no object is found on the current page, it will
  112.   continue looking for an object on subsequent pages.
  113.  
  114.   When an OBJECT is found (objectOne), Paradox scans that portion
  115.   of the form defined below for another object (objectTwo).
  116.  
  117.        Defined width:  the area directly to the left of objectOne
  118.        Defined Height: from the top of objectOne to the midpoint of
  119.                        objectOne
  120.    
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.   PRODUCT  :  Paradox for Windows                   NUMBER  :  1314
  141.   VERSION  :  1.0
  142.        OS  :  WIN
  143.      DATE  :  April 27, 1993                           PAGE  :  3/7
  144.  
  145.     TITLE  :  Using Tab Order With UI Objects in a Form
  146.  
  147.  
  148.  
  149.  
  150.   If another object is found, one of the two cases below is
  151.   implemented.
  152.  
  153.        CASE 1:   If the midpoint of objectOne is ABOVE the top of
  154.                  objectTwo, then pressing [Tab] will select
  155.                  objectOne.
  156.        or
  157.  
  158.        CASE 2:   If the midpoint of objectOne IS EQUAL TO or BELOW
  159.                  the top of objectTwo, then pressing [Tab] will
  160.                  select objectTwo.
  161.  
  162.   If there are no other objects in the above defined area, then
  163.   pressing [Tab] will select objectOne.  This algorithm works for
  164.   all situations except the one described in Example 6.  The
  165.   following examples should help clarify the above algorithm.  In
  166.   these examples, each box is a Button Object, with the midpoint so
  167.   noted.
  168.  
  169.   EXAMPLE 1:
  170.  
  171.                              ┌─────────────────┐
  172.                              │                 │
  173.                              │                 │
  174.                 midpoint ───»├─    Button1     │
  175.           ╔═════════════════╗│                 │
  176.           ║                 ║│                 │
  177.           ║                 ║└─────────────────┘
  178.           ║     Button2     ║
  179.           ║                 ║
  180.           ║                 ║
  181.           ╚═════════════════╝
  182.  
  183.   Since the midpoint of Button1 is ABOVE Button2, pressing [Tab]
  184.   will select Button1.
  185.    
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.   PRODUCT  :  Paradox for Windows                   NUMBER  :  1314
  207.   VERSION  :  1.0
  208.        OS  :  WIN
  209.      DATE  :  April 27, 1993                           PAGE  :  4/7
  210.  
  211.     TITLE  :  Using Tab Order With UI Objects in a Form
  212.  
  213.  
  214.  
  215.  
  216.   EXAMPLE 2:
  217.  
  218.                                ┌─────────────────┐
  219.                  midpoint ───┐ │                 │
  220.           ╔═════════════════╗│ │                 │
  221.           ║                 ║└»├─    Button3     │
  222.           ║                 ║  │                 │
  223.           ║     Button4     ║  │                 │
  224.           ║                 ║  └─────────────────┘
  225.           ║                 ║
  226.           ╚═════════════════╝
  227.  
  228.   Since the midpoint of Button3 is BELOW Button4, pressing [Tab]
  229.   will select Button4.
  230.  
  231.   EXAMPLE 3:
  232.  
  233.           ┌──────────────────────────────────────┐
  234.           │                                      │
  235.           │  ╔═════════════════╗                 │
  236.           │  ║                 ║     Button5     │
  237.           │  ║                 ║                 │
  238.           │  ║     Button6     ║                 │
  239.           └──╫─────────────────╫─────────────────┘
  240.              ║                 ║
  241.              ╚═════════════════╝
  242.  
  243.   Since there are no objects to the left of Button5, pressing [Tab]
  244.   will select Button5.
  245.  
  246.   EXAMPLE 4:
  247.  
  248.             ┌─────────────────────────────────┐
  249.           ╔═╪═══════════════╗                 │
  250.           ║ │               ║                 │
  251.           ║ │               ║     Button7     │
  252.           ║ │   Button8     ║                 │
  253.           ║ │               ║                 │
  254.           ║ └───────────────╫─────────────────┘
  255.           ╚═════════════════╝
  256.  
  257.   This is the same as EXAMPLE 2 but the Button Objects are
  258.   overlapping.  Pressing [Tab] will select Button7.
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.   PRODUCT  :  Paradox for Windows                   NUMBER  :  1314
  273.   VERSION  :  1.0
  274.        OS  :  WIN
  275.      DATE  :  April 27, 1993                           PAGE  :  5/7
  276.  
  277.     TITLE  :  Using Tab Order With UI Objects in a Form
  278.  
  279.  
  280.  
  281.  
  282.    
  283.   EXAMPLE 5:
  284.  
  285.           ┌───────────────────────────────┐
  286.           │            Button9            │
  287.           │     ╔═══════════════════╗     │
  288.           │     ║                   ║     │
  289.           └─────╫───────────────────╫─────┘
  290.                 ║     Button10      ║
  291.                 ╚═══════════════════╝
  292.  
  293.   This is the same as EXAMPLE 3.  Pressing [Tab] will select
  294.   Button9.
  295.  
  296.   EXAMPLE 6:
  297.  
  298.             ┌────────────────┐
  299.             │    Button11    │
  300.           ╔═╪════════════════╪═╗
  301.           ║ │                │ ║
  302.           ║ └────────────────┘ ║
  303.           ║      Button12      ║
  304.           ╚════════════════════╝
  305.  
  306.   This case is the exception to the rule because Button11 is
  307.   horizontally contained within Button12.  When Paradox finds
  308.   OBJECTS in this pyramid type structure, the top OBJECT will
  309.   always receive focus first.  Had the right side of Button11
  310.   extended beyond the right side of Button12, you would need to
  311.   compare the midpoint of Button11 to the top of Button12 to
  312.   determine which object would receive focus first.
  313.  
  314.   SECTION III    An example that demonstrates how to alter the
  315.                  natural tab sequence without using ObjectPAL code.
  316.  
  317.   As stated in SECTION II, other objects play an important role in
  318.   determining the tab sequence among OBJECTS.  Here is what's
  319.   really happening when [Tab] is pressed:
  320.  
  321.   Paradox looks for ANY object in the form, not just the four UI
  322.   objects that have a Tab Stop property.  When it finds an object,
  323.   it looks within that object's container (those objects contained
  324.   by the object) to see if any of the inner objects have a Tab Stop
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338.   PRODUCT  :  Paradox for Windows                   NUMBER  :  1314
  339.   VERSION  :  1.0
  340.        OS  :  WIN
  341.      DATE  :  April 27, 1993                           PAGE  :  6/7
  342.  
  343.     TITLE  :  Using Tab Order With UI Objects in a Form
  344.  
  345.  
  346.  
  347.  
  348.   property.  If it finds one (or more) Paradox follows the
  349.   algorithm defined above to determine which OBJECT is next in the
  350.   tab sequence.
  351.  
  352.   Below is an example to help clarify how Paradox uses the
  353.   containership hierarchy when you press [Tab] among OBJECTS:
  354.  
  355.   Pressing [Tab] repeatedly in this form will move the pointer
  356.   through the Button Objects as if you were reading a newspaper (in
  357.   columns), rather than reading left to right across the page.
  358.  
  359.        ┌────────────────────────┐      ┌────────────────────────┐
  360.        │ Box1                   │      │ Box2                   │
  361.        │   ┌─────────────────┐  │      │   ┌─────────────────┐  │
  362.        │   │     Button1     │  │      │   │     Button5     │  │
  363.        │   └─────────────────┘  │      │   └─────────────────┘  │
  364.        │   ┌─────────────────┐  │      │   ┌─────────────────┐  │
  365.        │   │     Button2     │  │      │   │     Button6     │  │
  366.        │   └─────────────────┘  │      │   └─────────────────┘  │
  367.        │   ┌─────────────────┐  │      │   ┌─────────────────┐  │
  368.        │   │     Button3     │  │      │   │     Button7     │  │
  369.        │   └─────────────────┘  │      │   └─────────────────┘  │
  370.        │   ┌─────────────────┐  │      │   ┌─────────────────┐  │
  371.        │   │     Button4     │  │      │   │     Button8     │  │
  372.        │   └─────────────────┘  │      │   └─────────────────┘  │
  373.        │                        │      │                        │
  374.        └────────────────────────┘      └────────────────────────┘
  375.  
  376.   Box1 contains four objects, Button1 through Button4.  Likewise
  377.   Box2 also contains four objects, Button5 through Button8.  When
  378.   you first enter the form, Paradox finds the first object on the
  379.   form (reading like a book) which, in this example, is Box1.
  380.   Paradox then looks within Box1 for any objects that have a Tab
  381.   Stop property, when and if it finds one, it move to that OBJECT
  382.   (Button1) following the algorithm defined in SECTION II.
  383.  
  384.   When you press [Tab], Button2 will get focus NOT Button5 because
  385.   you are still working within the containership of Box1.  The tab
  386.   order will move VERTICALLY down the form until it reaches
  387.   Button4.  At this point, when you press [Tab], you will move to
  388.   Box2.  Paradox will again follow the same containership logic.
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.  
  404.   PRODUCT  :  Paradox for Windows                   NUMBER  :  1314
  405.   VERSION  :  1.0
  406.        OS  :  WIN
  407.      DATE  :  April 27, 1993                           PAGE  :  7/7
  408.  
  409.     TITLE  :  Using Tab Order With UI Objects in a Form
  410.  
  411.  
  412.  
  413.  
  414.   It will look within Box2 for any objects with the Tab Stop
  415.   property and move to that object following the algorithm in
  416.   SECTION II.
  417.  
  418.   In this example, Box1 and Box2 are visible boxes.  To apply this
  419.   in a more practical sense, the Box Objects should be made
  420.   invisible.  This can be accomplished by two possible techniques.
  421.   One technique is to inspect the Box Objects (right-click on the
  422.   Box Object), select Frame | Style, and choose the no frame
  423.   option.
  424.  
  425.   An alternative technique is to select all the objects (that the
  426.   box would contain) and group them together by selecting Design |
  427.   Group.  The grouping technique has the same effect as an
  428.   invisible box.
  429.  
  430.   You can build on the containership concept by placing other
  431.   (invisible) Box Objects within Box Objects to produce more
  432.   elaborate tab sequences.
  433.  
  434.   NOTE: This algorithm only applies for the [Tab] and [Shift+Tab]
  435.         keys.  It DOES NOT apply for the arrow keys.
  436.  
  437.  
  438.   DISCLAIMER: You have the right to use this technical information
  439.   subject to the terms of the No-Nonsense License Statement that
  440.   you received with the Borland product to which this information
  441.   pertains.
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.