Progress
AppBuilder
Developer’s Guide


Adding a Filter-control Window

Displaying a SmartFilter object necessarily takes up a certain amount of space on the display. Since display space is typically in short supply, you might prefer to allow the user to control whether the Filter is visible. One way to do this is to put the Filter in a separate, callable SmartWindow. ADM makes this choice easier to implement by supplying a dedicated Filter pushbutton as part of the SmartToolbar object.

Follow these steps to create a sample application that uses a Filter Window:

  1. Create a new SmartWindow instance to be the main window of this toy application. Populate it with a SmartDataObject, SmartDataViewer, and SmartToolbar. Allow the Advisor to create SmartLinks for you. Adjust sizes and positions as necessary. Your result should look similar to this:
  2. Click on the Toolbar’s menu button and choose Instance Properties. When the dialog box opens, set the Filter check box:
  3. Choose OK to dismiss the dialog box. Create a SmartWindow to be your Filter window. Populate it with a SmartFilter.
  4. Click on the Filter instance’s menu button and choose Instance Properties. The dialog box opens:
  5. Identify the data source and the filterable fields. For the purposes of this example, accept the default style and view-as settings. Choose OK.
  6. Click on the Filter’s menu button and choose SmartLinks. Add a Filter link from the Filter object (represented by the handle identifier) to the Window object (represented by THIS–PROCEDURE):
  7. Close the SmartLink editor. Resize the Filter Window as necessary. Save it using a distinctive name.
  8. Click on the SmartContainer tool in the Object Palette. When the Choose dialog box opens, select the Filter Window that you just saved, and choose OK. Place the object on any blank spot in your main Window. Allow the Advisor to create the links it suggests. Your result should now look similar to this:
  9. Click on the menu button of the Filter Window instance you just placed. Choose Instance Properties. When the dialog box opens, clear the View check box. This will prevent the Filter Window from automatically displaying at startup. Choose OK to dismiss the dialog box.
  10. Run your sample application. When it starts up, click the Filter button to open the Filter Window. Verify that you can filter the data stream:
  11. The Filter button only opens the Filter Window. To close the Filter Window, you must click the Close button (the X) at the right end of its title bar.


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