of_getwidth


pfcdwsrv.pbl   >   pfc_n_cst_dwsrv   >   of_getwidth   

Full name pfc_n_cst_dwsrv.of_getwidth
Access public
Extend of long
Return value long
Prototype public function long of_getwidth()

Name Datatype
No Data

Name Datatype
li_Count integer
li_NumObjects integer
ll_ObjWidth long
ll_Return long
ll_Width long
ll_X long
ls_Objects string[]

public function long of_getwidth ();//////////////////////////////////////////////////////////////////////////////
//
//	Function:  of_GetWidth
//
//	Access:    Public
//
//	Arguments: None
//
//	Returns:   long
//   The width of the datawindow
//
//	Description:  Get the width (x position + width of the rightmost object) of the 
//				     datawindow associated with this service
//
//////////////////////////////////////////////////////////////////////////////
//
//	Revision History
//
//	Version
//	5.0   Initial version
//
//////////////////////////////////////////////////////////////////////////////
//
//	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.
//
//////////////////////////////////////////////////////////////////////////////
long	ll_Width
long	ll_Return
integer	li_NumObjects
integer	li_Count
long	ll_X
long	ll_ObjWidth
string	ls_Objects[]

// Get the names of all visible objects in the datawindow
li_NumObjects = of_GetObjects(ls_Objects, "*", "*", True)

ll_Return = 0

For li_Count = 1 To li_NumObjects
	// Calculate the x position + the width of each object
	ll_X = Integer(idw_Requestor.Describe(ls_Objects[li_Count] + ".x"))
	ll_ObjWidth = Integer(idw_Requestor.Describe(ls_Objects[li_Count] + ".width"))
	ll_Width = ll_X + ll_ObjWidth

	// Return the rightmost value
	If ll_Width > ll_Return Then
		ll_Return = ll_Width
	End if
Next

Return ll_Return
end function

     
Name Owner
pfc_n_cst_dwsrv_report.of_gettextsizepos pfc_n_cst_dwsrv_report
pfc_n_cst_dwsrv_report.of_AddPicture pfc_n_cst_dwsrv_report
pfc_n_cst_dwsrv_report.of_SetBackground pfc_n_cst_dwsrv_report
pfc_n_cst_dwsrv_report.of_AddLine pfc_n_cst_dwsrv_report
pfc_n_cst_dwsrv_report.of_createcomposite pfc_n_cst_dwsrv_report
pfc_w_selection.open pfc_w_selection
pfc_w_restorerow.open pfc_w_restorerow

     
Name Owner
datawindow.describe datawindow
systemfunctions.integer systemfunctions
pfc_n_cst_dwsrv.of_getobjects pfc_n_cst_dwsrv

     
Full name
No Data

     
Name Scope
No Data