GetFirstSheet
PowerScript function
Description
Obtains the top sheet in the MDI frame, which may or may not be
active.
Applies to
MDI frame windows
Syntax
|
1 |
mdiframewindow.GetFirstSheet ( ) |
|
Argument |
Description |
|---|---|
|
mdiframewindow |
The MDI frame window for which you want the top |
Return value
Window. Returns the first (top) sheet in the MDI frame. If no sheet
is open in the frame, GetFirstSheet returns an invalid value. If
mdiframewindow is null, GetFirstSheet returns null.
Usage
To cycle through the open sheets in a frame, use GetFirstSheet and
GetNextSheet. Do not use these functions in combination with
GetActiveSheet.
Did GetFirstSheet return a valid window?
Use the IsValid function to find out if the return value is valid.
If it is not, then no sheet is open.
Examples
This script for a menu selection returns the top sheet in the MDI
frame:
|
1 2 3 4 5 6 7 8 |
window wSheet string wName wSheet = ParentWindow.GetFirstSheet() IF IsValid(wSheet) THEN // There is an open sheet wName = wsheet.ClassName() MessageBox("First Sheet is", wName) END IF |
See also