Adjust a runtime setting for sheet window size

Where you are

   Add a library to the search path

   Create a new ancestor sheet window

   Add user events and event scripts

   Add scripts to retrieve data for the DataWindow controls

Adjust a runtime setting for sheet window size

The Template Application wizard creates a sheet manager that makes the OpenSheet function call to open a sheet window. The OpenSheet function has an argument that can affect the sheet window size at runtime. By default the wizard sets this argument to the Cascaded! value that overrides the sheet window size you set at design time. Now you change this value to allow the runtime window size to be the same as the design time size.

  1. Double-click n_pbtutor_sheetmanager in the System Tree

    or

    Right-click n_pbtutor_sheetmanager in the System Tree and select Edit from the pop-up menu.

  2. In the Script view, select (Functions) in the first drop-down list box.

    Select of_opensheet in the second drop-down list box.

  3. Go to the following line in the script:

    li_rc = OpenSheet ( lw_sheet, as_sheetname, w_pbtutor_frame, 0, Cascaded! ) 
  4. Change the Cascaded! argument to Original!:

    li_rc = OpenSheet ( lw_sheet, as_sheetname, w_pbtutor_frame, 0, Original! )
  5. Click the Save button in PainterBar1.

    Click the Close button in PainterBar1.

    The next time you run the tutorial application, the sheet windows will open in the size you set at design time. They will still be cascaded relative to other open sheets.