|
of_unregister
|
|
Full name
|
pfc_n_cst_resize.of_unregister
|
Access
|
public
|
Extend of
|
integer
|
Return value
|
integer
|
Prototype
|
public function integer of_unregister(windowobject)
|
Name
|
Datatype
|
li_cnt
|
integer
|
li_registered_slot
|
integer
|
li_upperbound
|
integer
|
public function integer of_unregister (windowobject awo_control);//////////////////////////////////////////////////////////////////////////////
//
// Function: of_UnRegister
//
// Access: public
//
// Arguments:
// awo_control The control to unregister.
//
// Returns: integer
// 1 if it succeeds and -1 if an error occurs.
//
// Description: Unregister a control that was previously registered.
//
//////////////////////////////////////////////////////////////////////////////
//
// Revision History
//
// Version
// 5.0 Initial version
// 6.0 Changed to support for weighted movement and sizing of controls.
//
//////////////////////////////////////////////////////////////////////////////
//
// 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.
//
//////////////////////////////////////////////////////////////////////////////
integer li_upperbound
integer li_cnt
integer li_registered_slot
//Check parameters
If IsNull(awo_control) or (not IsValid(awo_control)) Then
Return -1
End If
//Confirm that the user object has already been initialized
If il_parentprevheight=-1 And il_parentprevwidth=-1 Then
Return -1
End If
//Get the current UpperBound
li_upperbound = UpperBound (inv_registered[])
//Find the registered object
li_registered_slot = 0
For li_cnt = 1 to li_upperbound
If inv_registered[li_cnt].wo_control = awo_control Then
li_registered_slot = li_cnt
exit
End If
Next
//If the control was not previously registered, return
//an error code.
If li_registered_slot = 0 Then
Return -1
End If
//Unregister the control
SetNull(inv_registered[li_registered_slot].wo_control)
inv_registered[li_registered_slot].s_typeof = ''
inv_registered[li_registered_slot].b_movex = False
inv_registered[li_registered_slot].i_movex = 0
inv_registered[li_registered_slot].b_movey = False
inv_registered[li_registered_slot].i_movey = 0
inv_registered[li_registered_slot].b_scalewidth = False
inv_registered[li_registered_slot].i_scalewidth = 0
inv_registered[li_registered_slot].b_scaleheight = False
inv_registered[li_registered_slot].i_scaleheight = 0
Return 1
end function
Name
|
Owner
|
systemfunctions.isnull |
systemfunctions
|
systemfunctions.isvalid |
systemfunctions
|
systemfunctions.setnull |
systemfunctions
|
systemfunctions.upperbound |
systemfunctions
|