GetNextSheet
PowerScript function
Description
Obtains the sheet that is behind the specified sheet in the MDI
frame.
Applies to
MDI frame windows
Syntax
|
1 |
mdiframewindow.GetNextSheet ( sheet ) |
|
Argument |
Description |
|---|---|
|
mdiframewindow |
The MDI frame window in which you want the next |
|
sheet |
The sheet for which you want the sheet that is behind |
Return value
Window. Returns the sheet that is behind sheet in the MDI frame. If
there is no sheet behind sheet, GetNextSheet returns an invalid value. If
any argument’s value is null, GetNextSheet returns null.
Usage
To cycle through the open sheets in a frame, use GetFirstSheet to
get the front sheet and GetNextSheet one or more times to get the rest of
the sheets. Test each return value with IsValid to see if you have reached
the last sheet. Do not use GetFirstSheet and GetNextSheet in combination
with GetActiveSheet.
Did GetNextSheet return a valid window?
Use the IsValid function to find out if GetNextSheet returned a
valid window. If there is no sheet behind the one you specified, the
return value is not valid.
Examples
The following script for a menu selection loops through the open
sheets in front-to-back order and displays the names of the open sheets in
the ListBox lb_sheets:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 |
boolean bValid window wSheet lb_sheets.Reset() wSheet = ParentWindow.GetFirstSheet() IF IsValid(wSheet) THEN lb_sheets.AddItem(wSheet.Title) DO wSheet = ParentWindow.GetNextSheet(wSheet) bValid = IsValid (wSheet) IF bValid THEN lb_sheets.AddItem(wSheet.Title) LOOP WHILE bValid END IF |
See also