of_reset


pfcmain.pbl   >   pfc_u_tvs   >   of_reset   

Full name pfc_u_tvs.of_reset
Access public
Extend of integer
Return value integer
Prototype public function integer of_reset()

Name Datatype
No Data

Name Datatype
li_index integer
li_level integer
ll_rootitem long

public function integer of_reset ();//////////////////////////////////////////////////////////////////////////////
//
//	Function:	of_Reset
//
//	Access:		public
//
//	Arguments:  None
//
//	Returns:  Integer
//	 1 if it succeeds
//	-1 if an error occurs.
//	
//	Description:
//	Reset the entire treeview (items and datastores).
//
//////////////////////////////////////////////////////////////////////////////
//	
//	Revision History
//
//	Version
//	6.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_rootitem
integer	li_index, li_level

this.setredraw(false)

//// Find the root of the treeview control
//ll_rootitem = this.FindItem(RootTreeItem!, 0)
//
//Do While ll_rootitem > 0
//	// collapse all expanded items
//	this.CollapseItem(ll_rootitem) 
//
//	// remove all items
//	this.DeleteItem(ll_rootitem) 
//
//	ll_rootitem = this.FindItem(RootTreeItem!, 0)
//Loop
this.deleteitem(0)

// reset the data from the datasource
If isvalid(inv_levelsource) Then
	If inv_levelsource.of_resettree() <> 1 Then Return -1
End If

this.setredraw(true)

Return 1
end function

     
Name Owner
No Data

     
Name Owner
dragobject.setredraw dragobject
treeview.deleteitem treeview
systemfunctions.isvalid systemfunctions
pfc_n_cst_tvsrv_levelsource.of_resettree pfc_n_cst_tvsrv_levelsource

     
Full name
No Data

     
Name Scope
No Data