next up previous contents
Next: 3 Custom Programming Up: 2.2 Fx Widgets Previous: 2.2.2 Entry types

2.2.3 Notebooks and tabs

Qddb Schemas are often quite large and sometimes contain more attributes than we can fit on the screen at once. Notebooks are very convenient for organizing the entries into logical sections. Each notebook has a set of tabs. Each tab contains a frame and a set of entries. You may have multiple notebooks in a single application, but the notebooks cannot be nested.

The basic structure of a notebook is as follows:

    [notebook]
        [tab label=Tab1 underline=3]
        [end tab]
        [tab label=Tab2 underline=3]
        [end tab]
        [tab label=Tab3 underline=3]
        [end tab]
    [end notebook]

You may place arbitrary statements inside each pair of [tab] and [end tab] statements, but you may not place statements inside a notebook and outside the tabs. For example, the following QddbScript excerpt is invalid.

    [notebook]
        [tab label=Tab1 underline=3]
            ;# more entries
        [end tab]
        [entry attr=Items.Price]   ;# ERROR!!
        [tab label=Tab2 underline=3]
            [entry attr=Items.Qty] ;# OK!
            ;# more entries
        [end tab]
        [tab label=Tab3 underline=3]
            ;# more entries
        [end tab]
    [end notebook]

Qtime (http://www.hsdi.com/qddb/applications) is a good example of how notebook tabs can be used to condense the size of an application's screen. Figure 2.2 shows a screenshot of Qtime. If you have purchased a Qddb binary or source license, the full source code to this application is available to you free of charge.

  figure153
Figure 2.2: The Qtime application's screen



Herrin Software Development, Inc.