|
itemexpanding
|
|
Full name
|
pfc_u_tv.itemexpanding
|
Access
|
public
|
Extend of
|
|
Return value
|
|
Prototype
|
event itemexpanding()
|
Name
|
Datatype
|
li_RC
|
Integer
|
ltvi_This
|
TreeViewItem
|
event itemexpanding;//////////////////////////////////////////////////////////////////////////////
//
// Event: ItemExpanding
//
// Description: If this is the first time the item is expanded,
// call of_PopulateLevel to populate it with its children.
//
// This is done in this event as opposed to the ItemPopulate
// event because it needs to be executed again if the children
// are deleted (of_RefreshItem).
//
//////////////////////////////////////////////////////////////////////////////
//
// Revision History
//
// Version
// 5.0 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_RC
TreeViewItem ltvi_This
If FindItem(ChildTreeItem!, handle) = -1 Then
// No children, so populate
if GetItem(handle, ltvi_This) > 0 then
li_RC = of_PopulateLevel((ltvi_This.Level + 1), handle)
If li_RC < 1 Then
ltvi_This.Children = False
SetItem(handle, ltvi_This)
End if
end if
End If
end event