Progress
Programming
Handbook


Creating and Managing Windows

You can create a new window dynamically with the CREATE Widget statement.

This is the syntax for creating a window:

SYNTAX
CREATE WINDOW handle
  [ IN WIDGET-POOL pool-name ]
  [ ASSIGN attribute = value [ attribute = value ] ... ]
  { [ trigger-phrase ] } 

NOTE: Character interfaces support only a single window. If you attempt to create additional windows, Progress raises the ERROR condition.

You must define handle as a WIDGET–HANDLE variable, field, or parameter before creating the window. Likewise, you must create the widget pool specified by poolname using a CREATE WIDGET–POOL statement before you reference the widget pool in the CREATE WINDOW statement. In some applications, you might prefer to use unnamed widget pools to contain your windows. This is especially useful with windows created by persistent procedures, where a single unnamed widget pool can encompass the entire dynamic context of the procedure.

One of the advantages of creating your own window is the ability to specify all of its attributes. The ASSIGN option allows you to specify any window attribute you want, including those that must be specified before realization. These include sizing and component attributes, such as RESIZE and MESSAGE–AREA.

You can specify user interface triggers for a window using either the triggerphrase or the ON statement. The triggerphrase offers the convenience of a single window context, while the ON statement offers the flexibility to define your triggers conditionally, after the window is created.

For more information on handles, attributes, and user interface triggers, see Widgets and Handles." For more information on widget pools, see Using Dynamic Widgets."


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