|
of_getlevel
|
|
Full name
|
pfc_n_cst_tvsrv_levelsource.of_getlevel
|
Access
|
public
|
Extend of
|
integer
|
Return value
|
integer
|
Prototype
|
public function integer of_getlevel(long)
|
Name
|
Datatype
|
li_Index
|
Integer
|
li_Limit
|
Integer
|
ltvi_Item
|
TreeViewItem
|
public function integer of_getlevel (long al_handle);//////////////////////////////////////////////////////////////////////////////
//
// Function: of_GetLevel
//
// Access: public
//
// Arguments:
// al_handle The handle of the treeview item.
//
// Returns: Integer
// # of the level the treeview item is on if successful
// -1 if an error occurs
//
// Description: Find the level a treeview item resides on. This function takes
// the recursive natrue of the treeview into account.
//
//////////////////////////////////////////////////////////////////////////////
//
// 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.
//
//////////////////////////////////////////////////////////////////////////////
Integer li_Index, li_Limit
TreeViewItem ltvi_Item
// check reference variables
If IsNull(itv_requestor) or Not IsValid(itv_requestor) Then Return -1
If itv_requestor.GetItem(al_Handle, ltvi_Item) = -1 Then Return -1
// Determine proper element in the data source structure
li_Limit = UpperBound(inv_attrib)
If ltvi_Item.Level > li_Limit Then
li_Index = li_Limit
Else
li_Index = ltvi_Item.Level
End If
return li_Index
end function
Name
|
Owner
|
treeview.getitem |
treeview
|
systemfunctions.isnull |
systemfunctions
|
systemfunctions.isvalid |
systemfunctions
|
systemfunctions.upperbound |
systemfunctions
|