A sheet is a document window that is contained within an MDI frame window. MDI applications allow several sheets to be open at the same time. The newly opened sheet becomes the active sheet. If the opened sheet has an associated menu, that menu becomes the menu at the top of the frame.
When you specify windowtype, the window object specified in windowtype must be the same data type as sheetrefvar (a data type includes data types inherited from it). The data type of sheetrefvar is usually window, from which all windows are inherited, but it can be any ancestor of windowtype. If it is not the same type, an execution error will occur.
PowerBuilder doesn't automatically copy objects that are dynamically referenced (through string variables) into your executable. To include the window object specified in windowtype in your application, list it in the resource (PBR) file that you use when you build the executable.
For more information about PBR files for an executable, see the PowerBuilder User's Guide.
OpenSheet opens a sheet and appends its name to the item on the menu bar specified in position. If position is 0 or greater than the number of items on the menu bar, PowerBuilder appends the name of the sheet to the next-to-last menu item in the menu bar. In most MDI applications, the next-to-last menu item on the menu bar is the Window menu, which contains options for arranging sheets, as well as the list of open sheets.
If the sheets don't appear on the menu PowerBuilder can't append the sheets to a menu that doesn't have any other menu selections. Make sure that the menu you specify or, if you leave out position, the next-to-last menu has at least one other item.
If more than nine sheets are open in the frame, the first nine are listed on the menu specified by position and a final item More Windows is added.
Sheets in a frame cannot be made invisible. When you open a sheet, the value of the Visible property is ignored. Changing the Visible property when the window is already open has no effect.
Opening response windows Do not use the OpenSheet function to open a response window.