|
of_buildtree
|
|
Full name
|
pfc_n_cst_tvsrv_print.of_buildtree
|
Access
|
protected
|
Extend of
|
string
|
Return value
|
string
|
Prototype
|
protected function string of_buildtree(long,string,string)
|
Name
|
Datatype
|
ll_Next
|
Long
|
ls_Return
|
String
|
ltvi_Item
|
TreeViewItem
|
protected function string of_buildtree (long al_handle, string as_picts, string as_levelpicts);//////////////////////////////////////////////////////////////////////////////
//
// Function: of_BuildTree
//
// Access: protected
//
// Arguments:
// al_Handle The handle of the TreeView item to start building the tree.
// as_Picts The file names for the picture and selected picture to display.
// as_LevelPicts The file names for all the pictures and selected pictures to display
// when using a different picture for each level.
//
// Returns: String
// The ImportString data to populate the DataWindow that will be printed.
//
// Description: Build the data to populate the DataWindow that will be printed to print
// a TreeView. This function is called by of_PrintTree and is recurrsive.
//
//////////////////////////////////////////////////////////////////////////////
//
// 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.
//
//////////////////////////////////////////////////////////////////////////////
String ls_Return
Long ll_Next
TreeViewItem ltvi_Item
If al_Handle <= 0 Then Return ""
itv_requestor.GetItem(al_Handle, ltvi_Item)
ls_Return = " ~t" + left(ltvi_Item.Label,55) + "~t" + as_Picts
If ltvi_Item.Selected Then
ls_Return = ls_Return + "~t1"
Else
ls_Return = ls_Return + "~t0"
End if
If ltvi_Item.Expanded Then
ls_Return = ls_Return + "~t1"
Else
ls_Return = ls_Return + "~t0"
End if
If ltvi_Item.Children Then
ls_Return = ls_Return + "~t1~t0"
Else
ls_Return = ls_Return + "~t0"
If itv_requestor.FindItem(NextTreeItem!, al_Handle) > 0 Then
ls_Return = ls_Return + "~t1"
Else
ls_Return = ls_Return + "~t0"
End if
End if
ls_Return = ls_Return + "~t" + String(ltvi_Item.Level) + "~t" + as_LevelPicts + "~r~n"
If ltvi_Item.Expanded And ltvi_Item.Children Then
ll_Next = itv_requestor.FindItem(ChildTreeItem!, al_Handle)
ls_Return = ls_Return + of_buildtree(ll_Next, as_Picts, as_LevelPicts)
End if
ll_Next = itv_requestor.FindItem(NextTreeItem!, al_Handle)
ls_Return = ls_Return + of_buildtree(ll_Next, as_Picts, as_LevelPicts)
Return ls_Return
end function
Name
|
Owner
|
treeview.finditem |
treeview
|
treeview.getitem |
treeview
|
systemfunctions.left |
systemfunctions
|
systemfunctions.string |
systemfunctions
|
pfc_n_cst_tvsrv_print.of_buildtree |
pfc_n_cst_tvsrv_print
|