of_setenabled


pfcdwsrv.pbl   >   pfc_n_cst_dwsrv_printpreview   >   of_setenabled   

Full name pfc_n_cst_dwsrv_printpreview.of_setenabled
Access public
Extend of integer
Return value integer
Prototype public function integer of_setenabled(boolean)

Name Datatype
No Data

Name Datatype
No Data

public function integer of_setenabled (boolean ab_enabled);//////////////////////////////////////////////////////////////////////////////
//
//	Function:  of_SetEnabled
//
//	Access:  public
//
//	Arguments:  ab_enabled
//	true = display DW in printpreview mode
//	false = Do not display in printpreview mode
//
//	Returns:  integer
//	 1 = success
//	-1 = error
//
//	Description:  Sets whether printpreview mode is currently enabled
//
//////////////////////////////////////////////////////////////////////////////
//
//	Revision History
//
//	Version
//	5.0   Initial version
// 6.0.01 Prevent error condition when datawindow is nested.
//
//////////////////////////////////////////////////////////////////////////////
//
//	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.
//
//////////////////////////////////////////////////////////////////////////////

// Check for valid requestor
if IsNull(idw_requestor) Or not IsValid (idw_requestor) then
	return -1
end if

// Check argument
if IsNull(ab_enabled) then
	return -1
end if

// Prevent error condition when datawindow is nested.
If Lower(idw_requestor.Describe("DataWindow.Nested")) = 'yes' Then
	Return -1
End If

// Set printpreview mode
idw_requestor.object.datawindow.print.preview = ab_enabled
return 1

end function

     
Name Owner
pfc_u_dw.pfc_printpreview pfc_u_dw
pfc_u_tabpg_dwproperty_srvprintpreview.pfc_propertyapply pfc_u_tabpg_dwproperty_srvprintpreview

     
Name Owner
datawindow.describe datawindow
systemfunctions.isnull systemfunctions
systemfunctions.isvalid systemfunctions
systemfunctions.lower systemfunctions

     
Full name
No Data

     
Name Scope
No Data