of_updateobjectdata


pfcmain.pbl   >   pfc_u_st_splitbar   >   of_updateobjectdata   

Full name pfc_u_st_splitbar.of_updateobjectdata
Access protected
Extend of integer
Return value integer
Prototype protected function integer of_updateobjectdata()

Name Datatype
No Data

Name Datatype
li_cnt Integer
li_upperbound Integer

protected function integer of_updateobjectdata ();//////////////////////////////////////////////////////////////////////////////
//
//	Function:  		of_UpdateObjectData
//
//	Access:  		Protected
//
//	Arguments:		None.
//
//	Returns:  		Integer
//						Returns 1 if it succeeds and -1 if an error occurs.
//
//	Description: 	Update the registered object data in order to minimize
//						rounding problems.
//
//////////////////////////////////////////////////////////////////////////////
//
//	Revision History
//
//	Version
//	6.0   Initial version
//
//////////////////////////////////////////////////////////////////////////////
//
//	Copyright © 1996 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_cnt
Integer li_upperbound

li_upperbound = Upperbound (idrg_lefttop)	
For li_cnt = 1 to li_upperbound
	If IsValid(idrg_lefttop[li_cnt]) Then
		If abs(ir_lefttopx[li_cnt] - idrg_lefttop[li_cnt].X) > ii_rounding Then
			ir_lefttopx[li_cnt] = idrg_lefttop[li_cnt].X
		End If	
		If abs(ir_lefttopy[li_cnt] - idrg_lefttop[li_cnt].Y) > ii_rounding Then
			ir_lefttopy[li_cnt] = idrg_lefttop[li_cnt].Y
		End If	
		If abs(ir_lefttopwidth[li_cnt] - idrg_lefttop[li_cnt].Width) > ii_rounding Then
			ir_lefttopwidth[li_cnt] = idrg_lefttop[li_cnt].Width
		End If	
		If abs(ir_lefttopheight[li_cnt] - idrg_lefttop[li_cnt].Height) > ii_rounding Then
			ir_lefttopheight[li_cnt] = idrg_lefttop[li_cnt].Height
		End If			
	End If
Next
	
li_upperbound = Upperbound (idrg_rightbottom)	
For li_cnt = 1 to li_upperbound
	If IsValid(idrg_rightbottom[li_cnt]) Then
		If abs(ir_rightbottomx[li_cnt] - idrg_rightbottom[li_cnt].X) > ii_rounding Then
			ir_rightbottomx[li_cnt] = idrg_rightbottom[li_cnt].X
		End If	
		If abs(ir_rightbottomy[li_cnt] - idrg_rightbottom[li_cnt].Y) > ii_rounding Then
			ir_rightbottomy[li_cnt] = idrg_rightbottom[li_cnt].Y
		End If	
		If abs(ir_rightbottomwidth[li_cnt] - idrg_rightbottom[li_cnt].Width) > ii_rounding Then
			ir_rightbottomwidth[li_cnt] = idrg_rightbottom[li_cnt].Width
		End If	
		If abs(ir_rightbottomheight[li_cnt] - idrg_rightbottom[li_cnt].Height) > ii_rounding Then
			ir_rightbottomheight[li_cnt] = idrg_rightbottom[li_cnt].Height
		End If			
	End If
Next

Return 1
end function

     
Name Owner
pfc_u_st_splitbar.of_lbuttonup pfc_u_st_splitbar

     
Name Owner
systemfunctions.abs systemfunctions
systemfunctions.isvalid systemfunctions
systemfunctions.upperbound systemfunctions

     
Full name
No Data

     
Name Scope
No Data