GetActiveSheet PowerScript function
Description
Returns the currently active sheet in an MDI frame window.
Controls
MDI frame windows
Syntax
|
1 |
<span>mdiframewindow</span>.<span>GetActiveSheet</span> ( ) |
|
Argument |
Description |
|---|---|
|
mdiframewindow |
The MDI frame window for which you want |
Return Values
Window. Returns the sheet that is currently active in mdiframewindow.
If no sheet is active, GetActiveSheet returns
an invalid value. If mdiframewindow is null, GetActiveSheet returns null.
Usage
Use the IsValid function to determine whether GetActiveSheet has
returned a valid window value.
Examples
These statements determine the active sheet in the
MDI frame window w_frame and change
the text of the menu selection m_close on
the menu m_file on the menu bar m_main.
If no sheet is active, the text is Close Window:
|
1 |
// Declare variable for active sheet |
|
1 |
window activesheet |
|
1 |
string mtext |
|
1 |
|
1 |
activesheet = w_frame.<span>GetActiveSheet</span>() |
|
1 |
IF IsValid(activesheet) THEN |
|
1 |
// There is an active sheet, so get its title; |
|
1 |
// change the text of the menu to read |
|
1 |
// Close plus the title of the active sheet |
|
1 |
mtext = "Close " + activesheet.Title |
|
1 |
m_main.m_file.m_close.Text = mtext |
|
1 |
|
1 |
ELSE |
|
1 |
// No sheet is active, menu says Close Window |
|
1 |
m_main.m_file.m_close.Text = "Close Window" |
|
1 |
END IF |
See Also
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest