of_updatepredefined


pfcwnsrv.pbl   >   pfc_n_cst_winsrv_statusbar   >   of_updatepredefined   

Full name pfc_n_cst_winsrv_statusbar.of_updatepredefined
Access protected
Extend of integer
Return value integer
Prototype protected function integer of_updatepredefined(string,integer)

Name Datatype
No Data

Name Datatype
li_cnt Integer
li_id Integer
li_upper Integer

protected function integer of_updatepredefined (string as_id, integer ai_width);//////////////////////////////////////////////////////////////////////////////
//
//	Function:  of_UpdatePreDefined
//
//	Access:  Protected
//
//	Arguments:
//	as_id			The ID of the Pre Defined object.
//	ai_width		The new desired width of the object.
//	
//	Returns:  integer
//	1 if it succeeds
//	0 if the ID is not registered.
// -1 if an error occurs.
//
//	Description:
//	Updates a Pre-Defined object information (if registered).
//
//////////////////////////////////////////////////////////////////////////////
//	
//	Revision History
//
//	Version
//	5.0.03   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.
//
//////////////////////////////////////////////////////////////////////////////

Integer 	li_upper
Integer	li_cnt
Integer	li_id=0

// Check arguments.
If IsNull(as_id) or Len(trim(as_id))= 0 or  &
	IsNull(ai_width) or ai_width < 0 Then
	Return -1
End If

// Check for a predefined ID.
If Not of_IsPredefined(Trim(as_id)) Then
	// Only valid for Pre-Defined IDs.
	Return -1
End If

// Get the number of Items currently registered.
li_upper = UpperBound (inv_dwobjects)

// Find the ID.
For li_cnt = 1 to li_upper
	If as_id = inv_dwobjects[li_cnt].s_id Then
		li_id = li_cnt
		Exit
	End If
Next

// Check if the ID was found.
If li_id = 0 Then
	Return 0
End If

// Update the object.
inv_dwobjects[li_id].i_width = ai_width

// Notify the GUI of the change.
If IsValid(iw_statusbar) Then
	iw_statusbar.of_CreateVisuals()
End If

Return 1
end function

     
Name Owner
pfc_n_cst_winsrv_statusbar.of_setuserwidth pfc_n_cst_winsrv_statusbar
pfc_n_cst_winsrv_statusbar.of_setgdiwidth pfc_n_cst_winsrv_statusbar
pfc_n_cst_winsrv_statusbar.of_setmemwidth pfc_n_cst_winsrv_statusbar
pfc_n_cst_winsrv_statusbar.of_settimerwidth pfc_n_cst_winsrv_statusbar
pfc_n_cst_winsrv_statusbar.of_setbarwidth pfc_n_cst_winsrv_statusbar

     
Name Owner
systemfunctions.isnull systemfunctions
systemfunctions.isvalid systemfunctions
systemfunctions.len systemfunctions
systemfunctions.trim systemfunctions
systemfunctions.upperbound systemfunctions
pfc_n_cst_winsrv_statusbar.of_ispredefined pfc_n_cst_winsrv_statusbar
pfc_w_statusbar.of_createvisuals pfc_w_statusbar

     
Full name
No Data

     
Name Scope
No Data