|
of_open
|
|
Full name
|
pfc_n_cst_winsrv_statusbar.of_open
|
Access
|
public
|
Extend of
|
integer
|
Return value
|
integer
|
Prototype
|
public function integer of_open(boolean)
|
Name
|
Datatype
|
lgo_withfocus
|
graphicobject
|
li_height
|
Integer
|
li_rc
|
Integer
|
li_width
|
Integer
|
ls_dwdefinition
|
string
|
public function integer of_open (boolean ab_switch);//////////////////////////////////////////////////////////////////////////////
//
// Function: of_Open
//
// Access: public
//
// Arguments:
// ab_switch True to open the window. False to close the window.
//
// Returns: Integer
// 1 if it succeeds.
// 0 no action taken.
// -1 if an error occurs.
//
// Description:
// Opens an instance of w_statusbar window.
// Sets the desired refresh rate.
// Makes sure focus stays on the Frame window.
//
//////////////////////////////////////////////////////////////////////////////
//
// Revision History
//
// Version
// 5.0 Initial version
// 5.0.03 Added functionality to properly restore focus.
//
//////////////////////////////////////////////////////////////////////////////
//
// Copyright © 1996-1999 Sybase, Inc. and its subsidiaries. All rights reserved.
// Any distribution of the PowerBuilder Foundation Classes (PFC)
// source code by other than Sybase, Inc. and its subsidiaries is prohibited.
//
//////////////////////////////////////////////////////////////////////////////
Integer li_rc
Integer li_width, li_height
string ls_dwdefinition
graphicobject lgo_withfocus
//Check arguments
If IsNull(ab_switch) Then
Return -1
End If
// Check window reference.
If IsNull(iw_requestor) Or Not IsValid(iw_requestor) Then
Return -1
End If
// Create the datawindow object.
li_rc = of_createdwobject(ls_dwdefinition, li_width, li_height)
If li_rc <> 1 Then Return -1
If ab_switch Then
// Get the current object with focus.
lgo_withfocus = GetFocus()
// Open the status bar window.
li_rc = Open(iw_statusbar, iw_requestor)
// Restore the focus to the previous object.
of_RestoreFocusPoint(lgo_withfocus)
// Set the Refresh rate on the status bar window.
If IsValid(iw_statusbar) Then
iw_statusbar.of_SetRefreshRate(ii_refreshrate)
End If
Return li_rc
Else
If IsValid(iw_statusbar) Then
li_rc = Close(iw_statusbar)
Return li_rc
End If
End If
Return 0
end function