Progress
AppBuilder
Developer’s Guide


Paging with SmartFolders

The ADM SmartFolder object offers a convenient, popular way to develop a paged interface design. The SmartFolder implements the tabbed-file-folder metaphor with which most people who work in an office are familiar. The images in Figure 3–9 show the SmartFolder in use, managing the display of two pages in a toy contact-management application.

Figure 3–9: Paging Using a SmartFolder

While convenient to use and appropriate for many applications, SmartFolder may not be suitable for all cases. Although you can define up to 32 tabs, they will all be shown in a single line. This spares your users the disorientation of having tab rows re-order themselves, but might require that they use a horizontal scrollbar.

If you conclude that a SmartFolder is an appropriate way for you to manage paging in your application, follow these steps:

  1. Sketch out the purpose and organization of each tabbed page. Keep in mind these points:
    • There is no tab for Page 0. The leftmost tab always selects Page 1.
    • Non-Smart objects will always be visible by default, regardless of the tab selected. They always reside on Page 0, and objects on Page 0 are always visible unless you add special code to manage the situation.
    • If your design requires that you place non-Smart objects within the perimeter of the SmartFolder, you might need to treat them in a special way.
    • For example, a Rectangle cannot be placed directly on the surface of a SmartFolder—it sinks below the surface and cannot be seen. Nor can it be brought to the surface using Layout Move-to-Top. To use a Rectangle for visual organization, you must first place a borderless (thus invisible) Frame object, with its Scroll Bars option turned off, on the SmartFolder. Then place the desired Rectangle on the Frame. The Frame will keep the Rectangle from sinking through the SmartFolder. (You should probably avoid placing non-Smart objects within the SmartFolder if you can.)

  2. Be sure that your workspace is a SmartWindow, SmartDialog, or SmartFrame. No other organizer object will support ADM paging.
  3. Set your Design Page to 0.

CAUTION: Since nested paging is not possible—ADM supports only a single set of pages for any single SmartContainer—the SmartFolder must always reside on Page 0. If you place the SmartFolder on, for example, Page 1, it will abruptly disappear from view the moment you select the tab for any other page.
  1. Click the SmartFolder tool icon in the Objects Palette:
  2. Move your cursor over an empty spot on your workspace, and click again to place the new SmartFolder:
  3. A Progress Advisor dialog box will appear, offering to create a Page SmartLink between the Smart workspace and the new SmartFolder object. Examine the offer, and accept it if it seems appropriate.
  4. The Page link allows the SmartFolder to tell the Smart organizer which page to display when the user selects a tab. For more detailed information about SmartLinks and their meanings, see the Progress ADM 2 Guide .

  5. If necessary, click on the SmartFolder to reveal its handles (you can see them illustrated in Step 5). Use the handles to adjust the size and position of the SmartFolder appropriately.
  6. Click on the SmartFolder’s menu button and choose Instance Properties. This dialog box will open:
    • Enter the labels for the tabs you will use. To move to a new field, choose the Insert button. If you wish to insert a field before the current field, use the UP-ARROW key. To remove an entry, choose the Remove button.
    • If you wish to use a special font for the tab labels, choose the Font button and select a font in the dialog box that opens in response (see the "Text Style Selector and Editor" section in "Frequently Used Dialogs,"for more information.)
    • By default, the width of the each tab agrees with the label; tabs are not of fixed size. If you prefer fixed-size tabs (shown in Figure 3–9), check the appropriate box and enter a size for the tab. You may need to experiment to achieve a pleasing effect.
    • When you have finished configuring the tabs and their labels, choose OK to dismiss the dialog.

  7. Set the Design Page to 1 (remember: the leftmost tab selects Page 1, not Page 0). Place and arrange the SmartObjects belonging to Page 1. To control how the objects layer on top of one another, use Layout Move-to-Top and Layout Move-to-Bottom. Check to be sure this is effective: not all objects respond to relayering requests.
  8. NOTE: Remember that only SmartObjects can participate in ADM paging. If your layout includes non-Smart objects, they will remain visible regardless of the tab selected.

  9. Repeat Step 9 for each succeeding page you defined, being sure to set the Design Page correctly each time before beginning to place objects. If you make a mistake, open the Pages dialog and move the misplaced objects to the correct page. See the "ADM Pages Manager" section in "Frequently Used Dialogs," for more information.
  10. Set your Startup Page to the appropriate nonzero number, generally 1. Save your work.

Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095