of_setstatusbar


pfcmain.pbl   >   pfc_w_frame   >   of_setstatusbar   

Full name pfc_w_frame.of_setstatusbar
Access public
Override of integer
Return value integer
Prototype public function integer of_setstatusbar(boolean)

Name Datatype
ab_switch boolean

Name Datatype
lenv_obj environment

public function integer of_setstatusbar (boolean ab_switch);//////////////////////////////////////////////////////////////////////////////
//
//	Function:  		of_SetStatusBar
//
//	Access:  		public
//
//	Arguments:		
//	ab_switch		True - start (create) the service,
//						False - stop (destroy) the service
//
//	Returns:  		Integer
//	 1 - Successful operation.
//	 0 - No action taken.
//	-1 - An error was encountered.
//
//	Description:
//	Starts or stops the Statusbar service
//
//////////////////////////////////////////////////////////////////////////////
//
//	Revision History
//
//	Version
//	5.0   Initial version
//	5.0.02   Disable service for non-Windows platforms
//	5.0.03	Only let service work on MDI w/microhelp window types
//
//////////////////////////////////////////////////////////////////////////////
//
//	Copyright © 1996-1997 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.
//
//////////////////////////////////////////////////////////////////////////////

environment	lenv_obj

// Check arguments
If IsNull(ab_switch) Then 
	Return -1
End If

If this.windowtype <> mdihelp! Then
	Return -1
End If 

// Check current platform to determine if statusbar service is supported
GetEnvironment (lenv_obj)
if IsValid (lenv_obj) then
	if lenv_obj.ostype <> windows! and lenv_obj.ostype <> windowsnt! then
		return -1
	end if
end if

if ab_switch then
	if IsNull(inv_statusbar) Or not IsValid (inv_statusbar) then
		inv_statusbar = create n_cst_winsrv_statusbar
		inv_statusbar.of_SetRequestor (this)
		Return 1
	end if
else
	if IsValid (inv_statusbar) then
		destroy inv_statusbar
		Return 1
	end if
end if

Return 0
end function

     
Name Owner
w_frame_mdi.pfc_preopen w_frame_mdi
pfc_w_frame.close pfc_w_frame
w_frame_mdi.pfc_preopen w_frame_mdi

     
Name Owner
systemfunctions.getenvironment systemfunctions
systemfunctions.isnull systemfunctions
systemfunctions.isvalid systemfunctions
pfc_n_cst_winsrv.of_setrequestor pfc_n_cst_winsrv

     
Full name
pfc_w_frame

     
Name Scope
No Data