of_register


pfcdwsrv.pbl   >   pfc_n_cst_dwsrv_resize   >   of_register   

Full name pfc_n_cst_dwsrv_resize.of_register
Access public
Extend of integer
Return value integer
Prototype public function integer of_register(string,string)

Name Datatype
No Data

Name Datatype
FULL_PERCENT integer
lb_scale boolean
li_cnt integer
li_height integer
li_movex integer
li_movey integer
li_scaleheight integer
li_scalewidth integer
li_slot_available integer
li_upperbound integer
li_width integer
li_x integer
li_y integer

public function integer of_register (string as_control, string as_method);//////////////////////////////////////////////////////////////////////////////
//
//	Function:  		of_Register
//
//	Access:  		public
//
//	Arguments:		
//	as_control		The object being registered.
//	as_method		The desired resize/move method.
//						Valid values are:
//						 'FixedToRight'
//						 'FixedToBottom'
//						 'FixedToRight&Bottom'
//						 'Scale'
//						 'ScaleToRight'
//						 'ScaleToBottom'
//						 'ScaleToRight&Bottom'
//						 'FixedToRight&ScaleToBottom'
//						 'FixedToBottom&ScaleToRight'
//
//	Returns:  		integer
//	1 if it succeeds and -1 if an error occurs.
//
//	Description:  	
//	Register a control which needs to either be moved or resized
//	when the parent object is resized. 
//
//////////////////////////////////////////////////////////////////////////////
//
//	Revision History
//
//	Version
//	6.0   Initial version
//
//////////////////////////////////////////////////////////////////////////////
//
//	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.
//
//////////////////////////////////////////////////////////////////////////////

constant integer FULL_PERCENT= 100
integer			li_x, li_y, li_width, li_height
integer			li_upperbound
integer			li_cnt
integer			li_slot_available
integer			li_movex, li_movey
integer			li_scalewidth, li_scaleheight
boolean			lb_scale=False

//Check parameters
If IsNull(as_control) or Len(Trim(as_control))=0 or IsNull(as_method) Then
	Return -1
End If

//Translate and finish validating parameteters
Choose Case Lower(as_method)
	Case Lower(FIXEDRIGHT)
		li_movex = FULL_PERCENT
	Case Lower(FIXEDBOTTOM)
		li_movey = FULL_PERCENT
	Case Lower(FIXEDRIGHTBOTTOM)
		li_movex = FULL_PERCENT
		li_movey = FULL_PERCENT
	Case Lower(SCALE)
		lb_scale = True
	Case Lower(SCALERIGHT)
		li_scalewidth = FULL_PERCENT
	Case Lower(SCALEBOTTOM)
		li_scaleheight = FULL_PERCENT
	Case Lower(SCALERIGHTBOTTOM)
		li_scalewidth = FULL_PERCENT
		li_scaleheight = FULL_PERCENT
	Case Lower(FIXEDRIGHT_SCALEBOTTOM)		
		li_movex = FULL_PERCENT
		li_scaleheight = FULL_PERCENT
	Case Lower(FIXEDBOTTOM_SCALERIGHT)	
		li_movey = FULL_PERCENT
		li_scalewidth = FULL_PERCENT
Case Else
		Return -1
End Choose

Return of_Register(as_control, lb_scale, &
		li_movex, li_movey, li_scalewidth, li_scaleheight)
end function

     
Name Owner
pfc_n_cst_dwsrv_resize.of_register pfc_n_cst_dwsrv_resize
pfc_u_tabpg_dwproperty_srvresize.pfc_propertyapply pfc_u_tabpg_dwproperty_srvresize

     
Name Owner
systemfunctions.isnull systemfunctions
systemfunctions.len systemfunctions
systemfunctions.lower systemfunctions
systemfunctions.trim systemfunctions
pfc_n_cst_dwsrv_resize.of_register pfc_n_cst_dwsrv_resize

     
Full name
No Data

     
Name Scope
No Data