|
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
|
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