Lescasse Consulting
 Home    Company    News    Prices    Download    Buy    Forums   
Read Me
Buy
Forums
Resume
AntiSpam 1.2
wBackup 1.11
NetAccess 2.0
Visual APL 1.0 
APL+Win 8.0 
APL+Win Products 
APL+Win Objects™ 
APL+Win Training 
APL+Web Services
APL+Web Component 
APL+ History
Dyalog.Net Tutorial
Conferences 
Powerpoint
White Papers
Web Hosting
References
Links
 
APL+Win Objects™ 6.0

TADO5
TADO5 Tutorial
TAPLDraw5
TAPLEdit5
TAPLSession5
TAbale5
TAboutBox5
TAccess5
TAgent5
TBlatMail5
TButton5
TCDO5
TCRC5
TCancelButton5
TCheck5
TCheckGroup5
TChildForm5
TChooseColor5
TChooseFont5
TClipBoard5
TClock5
TCodeStats5
TColors5
TCombo5
TComboDrive5
TComboFilter5
TComboList5
TComboTree5
TCommandBar5
TCommandButton5
TControlClass5
TCueCard5
TDHTML5
TDHTMLEditor5
TDateTime5
TDateTimeFr5
TDates5
TDemoHandlers5
TDisplay5
TDOS5
TDualSelect5
TEdit5
TEditAmount5
TEditDir5
TEditEnter5
TEditFile5
TEditGrid5
TEditList5
TEditListview5
TEditMenu5
TEditNum5
TEditSelect5
TEditSpin5
TEmail5
TError5
TExampleForm5
TExcel5
TExcel5 Tutorial
TFindReplace5
TFOne5
TFTP5
TFTP5 Tutorial
TFileCompare5
TFileMenu5
TFileMenuDef5
TFlatButton5
TForm5
TFormClass5
TFormEditor5
TFrame5
TGetDir5
TGif5
TGifForm5
TGifWb5
TGoMenu5
TGraphX5
TGrid5
TGridDisplay5
TGridPrint5
TGUID5
THLine5
THTML5
THTML5 Tutorial
THTTP5
THelp5
THelpMenu5
TImagelist5
TInfo5
TIniFile5
TInstall5
TInternet5
TJpg5
TJpgWb5
TLabel5
TList5
TListview5
TLock5
TLogs5
TMAPI5
TMath5
TMDIForm5
TMSOutlook5
TMaskEdit5
TMedia5
TMenu5
TMessage5
TModalCall5
TMsgBox5
TNavigator5
TNetwork5
TNonVisualClass5
TODBC5
TOKButton5
TObject5
TOpenFile5
TOption5
TOptionGroup5
TOutlook5
TOutlookMail5
TOWCSpread5
TPDF5
TPFKeys5
TPage5
TPassword5
TPicture5
TPing5
TPopupMenu5
TPowerpoint5
TPowerpoint5 Tutorial
TPrinter5
TProgress5
TProgressDlg5
TQuestion5
TRegistry5
TRegistryKey5
TResource5
TRichEdit5
TSPX5
TSQLDMO5
TScheduler5
TScroll5
TSelector5
TSpinner5
TSplitter5
TStatus5
TStopWatch5
TTest5
TTestError5
TTextFile5
TTimer5
TTip5
TTipForm5
TTLI5
TToolBar5
TToolbox5
TToolsMenu5
TTrackbar5
TTranslate5
TTree5
TVLine5
TViewMenu5
TWebBrowser5
TWebServer5
TWebSite5
TWebSiteNet5
TWinMenu5
TWord5
TYesNo5
    Visits:  2581 (31 on line) Last Update: Dec 5, 2003  
    TTree5    Printer Friendly  
 
Description   Inheritance   Example   Properties   Methods
 
 Description

The TTree5 Object is a complex object displaying a Tree object with drag & drop capabilities It supports a Popup menu at the right click, allowing users to interactively changing the tree structure dragging and dropping branches, to rename nodes, to add new nodes, to delete nodes and branches It also has various methods to populate the tree from APL+Win nested arrays and finally allows you to display check boxes to the left of any node

See also: TComboTree5

Description   Inheritance   Example   Properties   Methods
 
 Inheritance

Inherits from:  TObject5

Description   Inheritance   Example   Properties   Methods
 
 Example
 
 

The above example was generated by the following APL+Win Objects™ code:


      'ff'Świ'*Create' 'TForm5'('*size'300 400)'DemoShow'
      'ff.tree'Świ'*Create' 'TTree5'('wherelc'Đ Đ '>' '>')('attach'1 2 3 4)
      'tree'Świ'treeex'1 0 0(1 2 2 3 4 4 2 3 2)('Label1' 'Label2' 'Label3' 'Label4' 'Label5' 'Label6' 'Label7' 'Label8' 'Label9')(9˝›23 24 0 0)(9˝›'')
      'tree'Świ'ExpandTree'
      'tree'Gets5 5
      ‘tree
5

      'ff'Świ'*Create' 'TForm5'('*caption' 'TTree5 Example')('*size'300 400)'DemoShow'
      'ff'Świ'*.tree.Create' 'TTree5'('wherelc'Đ Đ'>' '>'0'>5+Objects')('caption' 'Objects')
      'ff'Świ'.tree.attach'1 2 3 4
      labels„ś'TObject5' 'TForm5' 'TEdit5' 'TEditList5' 'TEditSpin5' 'TCombo5' 'TComboFilter5'
      sons„7 2˝  1 Ż1     2 1     3 1       4 3         5 3        6 1        7 6
      images„122 121 0 0
      'ff'Świ'.tree.list'sons labels images
      'ff'Świ'*.tree.Expand' 'expandbranch'1
      'ff'Świ'.tree.Check'2 Ż3 5             © add check boxes to nodes 2 3 and 5 and check 2 and 5
      'ff'Świ'.tree.Check'(Ľ7)
      'ff'Świ'.tree.RemoveCheckBox'1 3 4 6
 
Description   Inheritance   Example   Properties   Methods
 
 Properties
 
allowcontextmenu    
Description:  Allows to use a context menu when right clicking the tree or not 
Syntax:  {boolean„'} 'obj' Świ 'allowcontextmenu' {boolean} 
boolean: 1(default)=right click displays a context menu, 0=right click has no effect 
Example: 
      'ff.tree' Świ 'allowcontextmenu'1 
allowdragdrop    
Description:  Allows to drag and drop a branch of the tree on to another branch 
Syntax:  {boolean„'} 'obj' Świ 'allowdragdrop' {boolean} 
boolean: 1(default)=drag & drop is allowed, 0=drag & drop has no effect 
Example: 
      'ff.tree' Świ 'allowdragdrop'1 
checkbox    
Description:  Display check boxes to the left of tree items or not 
Syntax:  {boolean„'} 'obj' Świ 'checkbox' {boolean} 
boolean: 1=display check boxes, 0(default)=do not display check boxes 
Example: 
      'ff.tree' Świ 'checkbox'1 
checked    
Description:  Indicate which item check boxes should be checked 
Syntax:  {booleanvec„'} 'obj' Świ 'checked' {booleanvec} 
booleanvec:  boolean vector with 1's for items which check boxes are checked 
Note:  show Check Boxes even if they were not visible before <checked> is called 
Example: 
      'ff.tree' Świ 'checked'1 0 0 1 0 0 0 1 1 
      'ff.tree' Świ 'checked'1               © check all items 
      'ff.tree' Świ 'checked'1 0             © check every other item 
class    
Description:  Return current object class 
Syntax:  class„'obj' Świ 'class' 
data    
Description:  Allows to specify additional data attached to tree branches 
Syntax:  {data„'} 'obj' Świ 'data' {nestedmatrix} 
nestedmatrix:  a nested matrix of data which number of rows matches the *list property number of rows 
Example: 
      'ff.tree' Świ 'data' (3 3˝'APL+Win'1000 1 'APL+Unx'3000 1 'APL+Dos'500 0) 
depths    
Description:  Indicate the tree item depths for all tree items 
Syntax:  {depths„'} 'obj' Świ 'depths' {depths} 
depths:  integer vector representing the depths of all the tree items 
Example: 
      'ff.tree' Świ 'depths'1 2 2 3 4 5 2 3 4 
dropatrootlevel    
Description:  Indicate whether the dropped items should become children of root or of target item on which they are dropped 
Syntax:  {boolean„'} 'obj' Świ 'dropatrootlevel' {boolean} 
boolean:  1=drop as children of root  0=drop as children of target item level 
Example: 
      'ff.tree' Świ 'dropatrootlevel'1 
help    
Example: 
0 0˝'ff' Świ '*Create' 'TForm5' ('*size'300 400) 'DemoShow' 
0 0˝'ff.tree' Świ '*Create' 'TTree5' ('wherelc'Đ Đ '>' '>') ('attach'1 2 3 4) 
0 0˝'tree' Świ 'treeex'1 0 0(1 2 2 3 4 4 2 3 2) ('Label1' 'Label2' 'Label3' 'Label4' 'Label5' 'Label6' 'Label7' 'Label8' 'Label9') (9˝›23 24 0 0) (9˝›'') 
0 0˝'tree' Świ 'ExpandTree' 
'tree'Gets5 5 
‘tree 
© Another way to work with the Tree object 
0 0˝'ff' Świ '*Create' 'TForm5' ('*caption' 'TTree5 Example') ('*size'300 400) 'DemoShow' 
0 0˝'ff' Świ '*.tree.Create' 'TTree5' ('wherelc'Đ Đ'>' '>'0'>5+Objects') ('caption' 'Objects') 
0 0˝'ff' Świ '.tree.attach'1 2 3 4 
labels„ś'TObject5' 'TForm5' 'TEdit5' 'TEditList5' 'TEditSpin5' 'TCombo5' 'TComboFilter5' 
sons„7 2˝  1 Ż1     2 1     3 1       4 3         5 3        6 1        7 6 
images„122 121 0 0 
0 0˝'ff' Świ '.tree.list'sons labels images 
0 0˝'ff' Świ '*.tree.Expand' 'expandbranch'1 
0 0˝'ff' Świ '.tree.Check'2 Ż3 5             © add check boxes to nodes 2 3 and 5 and check 2 and 5 
0 0˝'ff' Świ '.tree.Check' (Ľ7) 
0 0˝'ff' Świ '.tree.RemoveCheckBox'1 3 4 6 
ids    
Description:  Get or Set the tree item id numbers 
Syntax:  {intvec„'} 'obj' Świ 'ids' {intvec} 
intvec:  an integer vector of the tree items id numbers 
Example: 
      'ff.tree' Świ 'ids'1 7 6 5 4 3 2 8 9 
image    
Description:  Indicate whether an image should be displayed to the left of tree items or not 
Syntax:  {boolean„'} 'obj' Świ 'image' {boolean} 
boolean:  1(default)=an image is displayed to the left of tree items, 0=no image is displayed 
Example: 
      'ff.tree' Świ 'image'1 
images    
Description:  Get or Set the image numbers for all the tree items 
Syntax:  {images'} 'obj' Świ 'images' {images} 
images:  a 4-column integer matrix representing tree item images 
         [;1]  image for non selected node 
         [;2]  image for selected node 
         [;3]  index to an overlay image 
         [;4]  index to a user-state image (default=0) 
Example: 
      'ff.tree' Świ 'images' (9 4˝68 78 0 0) 
labels    
Description:  Get or Set the tree item labels 
Syntax:  {labels„'} 'obj' Świ 'labels' {labels} 
labels:  a nested vector of labels for all the tree items 
Example: 
      'ff.tree' Świ(›'labels'),(›'Test '),¨•¨Ľ9 
list    
Description:  Set or return the TTree list property 
Syntax:  'obj' Świ 'list'tree labels {images} {style} 
tree:    2-column integer matrix with son ids in column 1 and father ids in column 2 
labels:  character matrix of sons tree labels 
    or   vector of character vectors of tree labels 
images:  a b 0 0 where a & b are image indices in BUTTONS.BMP for non active & active nodes 
style:   (optional) a nested vector of styles being a subset of: 
         'highlightbold' 'highlightcut' 'highlightdrop' 'highlightselect' 
Example: 
      'ff.tree' Świ 'list' (4 2˝1 0 2 1 3 2 4 1) (ś'Node1' 'Node2' 'Node3' 'Node4') (23 24 0 0) '' 
R„C TreeMat I- Draw tree from node I" 
C „… Incidence matrix" 
I „… Node number from which to draw the tree" 
R „… Tree drawn as an integer matrix" 
The final tree matrix must be:   (0,tree[;Śio])[Śio+R]" 
Requires: -" 
(c) Eric Lescasse[3jan92]" 
movechildren    
Description:  Tells if the Move methods (MoveUp, MoveDn, MoveRight and MoveLeft) also move the topic children 
Syntax:  {boolean„'} 'obj' Świ 'movechildren' {boolean} 
boolean:  1=move children with topic; 0=don't 
Example: 
      'ff.tree' Świ 'movechildren'1 
states    
Description:  Get or Set state information for all nodes 
Syntax:  'obj' Świ 'states' {states} 
states:  a nested vector of nested vector containing state information for all tree nodes 
         Each nested vector contains a subset of the following items: 
         'highlightbold' 'highlightcut' 'highlightdrop' 'highlightselect' 'expanded' 
         'expandedonce' 'haschildren' 'forceparent' 
Example: 
      'ff.tree' Świ 'states' (9˝›'highlightbold' 'expanded') 
      aaa„'ff.tree' Świ 'states' 
      aaa[4]„›'highlightbold' 
      'ff.tree' Świ 'states'aaa 
tree    
Description:  Get or set a nested matrix representing a tree and optionnally addtional data associated with tree branches 
Syntax:  'obj' Świ 'tree' {nestedmatrix} 
nestedmatrix:  a nested APL matrix with at least 2 columns: 
nestedmatrix[;1]  tree node depths (starting at 1 for root) 
nestedmatrix[;2]  tree node labels 
nestedmatrix[;3]  0(default) or (a b 0 0) where a & b are image indices into BUTTONS.BMP 
nestedmatrix[;4]  '' or a nested vector containing any subset of: 
                    'highlightbold' 'highlightcut' 'highlightdrop' 'highlightselect' 'expanded' 
                    'expandedonce' 'haschildren' 'forceparent' 
0 4nestedmatrix  additional tree node data 
Example: 
      'ff.tree' Świ 'tree' (4 4˝1'Node1' (23 24 0 0) ('highlightbold' 'highlightselect')2'Node2' (23 24 0 0) ''3'Node3' (23 24 0 0) ''4'Node4' (23 24 0 0) '') 
treeex    
Description:  Get or Set the extended tree property describing the Tree content 
Syntax:  'obj' Świ 'tree'image checkbox ids depths{labels}{image indices}{state information} 
image: 0=do not display images or 1=display images 
checkbox: 0=do not display check boxes or 1=display check boxes 
ids: Đ=number nodes from 1 to N or vector of node numbers 
depths: vector of node depths 
labels: vector of node labels 
imageindices: vector of 44-element vectors of image indices 
stateinformation: vector of node state information 
Example: 
      'ff.tree' Świ 'treeex'0 1(Ľ4) (1 2 3 2) ('Node1' 'Node2' 'Node3' 'Node4') (›23 24 0 0) ('' '' ('highlightbold' 'highlightselect') '') 
Description   Inheritance   Example   Properties   Methods
 
 Methods
 
AddCheckBox    
Description:  Add check boxes to the tree for specified nodes 
Syntax:  'obj' Świ 'AddCheck'nodenos 
nodenos:  node numbers 
Example: 
      'ff.tree' Świ 'AddCheckBox'1 3 4 
AddNode    
Description:  Add a child node at the bottom of the currently active node 
Syntax:  'obj' Świ 'AddNode' 
Example: 
      'ff.tree' Świ 'AddNode' 
Check    
Description:  Get or Set the check boxes for one or more or all nodes 
Syntax:  'obj' Świ 'CheckBox'nodes 
nodes:  node numbers 
        (check boxes if nodes are >0, uncheck them if nodes are <0) 
Example: 
      'ff.tree' Świ 'Check'1 Ż3 4 
Children    
Description:  Return all node ids of the branch which start at a given node id 
Syntax:  nodeids„'obj' Świ 'Children'nodeid 
nodeid:  a node identifier 
nodeids:  its children 
Example: 
      'ff.tree' Świ 'Children'5 
5 6 7 8 
CollapseTree    
Description:  Collapses all tree branches 
Syntax:  'obj' Świ 'CollapseTree' 
Example: 
      'ff.tree' Świ 'CollapseTree' 
DeleteNode    
Description:  Deletes the currently active node.  Asks for confirmation. 
Syntax:  'obj' Świ 'DeleteNode' 
Example: 
      'ff.tree' Świ 'DeleteNode' 
ExpandTree    
Description:  Expands all tree branches 
Syntax:  'obj' Świ 'ExpandTree' 
Example: 
      'ff.tree' Świ 'ExpandTree' 
MoveDown    
Description:  Move the current node and all of its descendant down in the tree, retaining its depth 
Syntax:  'obj' Świ 'MoveDown' 
Example: 
      'ff.tree' Świ 'MoveDown' 
MoveUp    
Description:  Move the current node and all of its descendant up in the tree, retaining its depth 
Syntax:  'obj' Świ 'MoveUp' 
Example: 
      'ff.tree' Świ 'MoveUp' 
New     Description: Create a new instance of TTree5
Example:
      'obj' Świ '*Create' 'TTree5'

NodeDepths    
Description:  Return the vector of all node depths (i.e. second column of the <list> property, but more efficiently) 
Syntax:  depths„'obj' Świ 'Nodedepths' 
depths:  an integer vector of all node depths in <list> order 
Example: 
      'ff.tree' Świ 'NodeDepths' 
NodeIdDepths    
Description:  Return the vector of all node ids and depths (i.e. first 2 columns of the <list> property, but more efficiently) 
Syntax:  nodeids„'obj' Świ 'NodeIdDepths' 
nodeids:  a 2-column integer matrix in <list> order ([;1]=nodes, [;2]=depths) 
Example: 
      'ff.tree' Świ 'NodeIds' 
NodeIds    
Description:  Return the vector of all node ids (i.e. first column of the <list> property, but more efficiently) 
Syntax:  nodeids„'obj' Świ 'NodeIds' 
nodeids:  a numeric vector of all node ids in <list> order 
Example: 
      'ff.tree' Świ 'NodeIds' 
RemoveCheckBox    
Description:  Remove check boxes from the tree for the specified nodes 
Syntax:  'obj' Świ 'RemoveCheck'nodes 
nodes:  node numbers 
Example: 
      'ff.tree' Świ 'RemoveCheckBox'3 
SortAllNodes    
Description:  Sort all children alphabetically for all tree nodes 
Syntax:  'obj' Świ 'SortAllNodes' 
Example: 
      'ff.tree' Świ 'SortAllNodes' 
TopLevelNode    
Description:  Make the current node a top level node 
TreeIm    
Description:  Calculates incidence matrix from a tree matrix 
Syntax:  'obj' Świ 'TreeIm'tree 
tree:  a 2-column integer matrix with sons in column 1 and fathers in column 2 
Example: 
      'ff.tree' Świ 'TreeIm' (5 2˝1 0 2 1 3 2 4 1 5 3) 
Description   Inheritance   Example   Properties   Methods
 
 This entire Web site has been dynamically generated by APL+Win Objects™ 6.0
 For all questions contact:  info@lescasse.com
 Copyright © 2003-2005 Lescasse Consulting. All rights reserved.