Improved Notebook object.

John Moore submitted the tabbed notebook UI object in the Paradox Informant September 1995 issue.  I immediately put it to use and discovered a few ways it could be improved.  The changes are very minor and my thanks to John for doing 99.4% of the work.

For clarity, let me define my terms:
>> Notebook:  A box object which is the all-including container.
>> Sheet:     A group object named "TAB1" thru "TABn".  
>> Tab:	   The group within the sheet composed of several boxes and the text object with value of "Tab1", etc.

Included are 2 forms.  TEMPNOT1 is a 'live' sample of the Notebook, each sheet having one UIObject on it:  a field, button, or bitmap.  As you view the form, use the mouse to see the messages and notice how you can view and access only the visible, top-most UIObject.  The form TEMPNOT2 is an example of the Notetab object 'under construction.'  I use this to manipulate the Notebook object and then copy it to the form I am designing.

The improvements I submit:
>> Use of the CTL + PageDown or PageUp keys is already assigned to move right and left within a tableframe on a form.  I changed to using the ALT + PageUp/Down because I could not find it used otherwise within Paradox or Windows.

>> As the user tabbed from sheet to sheet, the current (highlighted) field on the 'old' sheet would 'bleed' through to the new sheet.  I added a method (mthFront) to the Notebook object.  It sets the 'Visible' property of the 'old' sheet to False and sets 'visible' to True for the new sheet.  No more bleed-through. I also added code in that method to find out the first field within that sheet (use Bring to Front & Send to back to arrange the order) and then tab to it. As the user tabs through the notebook, the cursor is placed at the first field within the new sheet.

>> Each sheet has ObjectPAL for only 1 object:  the tab (see above definition).  The mouseEnter and mouseExit code provides the developer a place to display a message on the status bar as to what data/functions are on that sheet.  The mouseDown method passes a single parameter, the number of its larger group container, to the mthFront method of the Notebook object I described earlier.

>> I improved the appearance of the tab sheet slightly but at great cost (I think).  Each tab group consists of 4 boxes in it, one of which contains the text object naming the sheet (use the Object Tree to see the relationship between the boxes).  Two of the boxes, the ones I added, are little, teeny tiny boxes to cover shading between the 3D box and the large BoxTab.  You may find it too much of a hassle dealing with these little boxes, and the appearance without them is not that much worse.  In my 'work' sample form (TEMPNOT2) I have 3 sheets.  The 2 little boxes are set for being viewed at 100%; if changed they no longer cover the areas completely and/or shade other areas.  Also the placement and size for each little box may vary from the first, far left tab and the last, righmost tab, as well as the one in the middle.  If you add another tab, copy TAB2 sheet, as its little boxes are correct for a middle tab.  As I said, it's a hassle but the appearance is somewhat nicer.

Some things I do to ease my use of designing a Notebook:

>> Create a separate form for manipulating the Notebook.  Expand the Notebook to the full size of the form.  Then 'unstack' all the sheets to add fields, etc.  When complete, make sure all the sheets are the same size (height and width), then align left & top.  Shrink the Notebook box to fit around the sheets and Viola!  the new and/or improved Notebook.

>> If you run the form and tab thru the notebook in ascending sequence, ending with last (highest number) sheet, then put in design mode, you can move the sheets around, "unstacking" them.  Or, in design mode, use the Object Tree to select a sheet (or an object within the sheet) and bring it to the front to 'unstack' or modify.

>> Remeber that code exits in 3 places:  the form "keyphysical" and the Notebook "keyPhysical" work together so the user can use ALT + PageUp/Down.  I usually forget the form code until in testing, but a more conscious person can add it right away.  You need to update code in 2 places:  the Notebook "keyPhysical" method declares a constant whose value is equal to the number of sheets within the Notebook; each tab (see definitions above) has code in the mouseDown method that must reflect the number part of its container sheet (1 for TAB1, 2 for TAB2, etc.).  This can be automated, probably; I'll let someone else contribute that piece.

