Tree Prim_Tree

Visual LANSA Feature

Tree (Prim_Tree)

DirectX Only

Tree is a member of a group of list related primitive controls referred to as User Designed Controls.

Tree organises individual design panels in to a hierarchical structure very similar to that of tree view (#Prim_trvw).

UDCs can be manipulated by the use of the typical LANSA list commands ADD_ENTRY, UPD_ENTRY etc.  When entries are added to the list, an instance of the design is made, fields can be passed in, and a corresponding list item is made.  UDCs control the position of the item within the list, manage selection, focus, expand/collapse etc., and communicate with the individual item designs through a series of predefined methods published on an interface specific to the type of UDC.  For Prim_Tree this is #Prim_Tree.iTreeDesign

All UDCs use a parameterized type to define the class of the design to be created each time an entry is added.  This is specified on the DEFINE_COM as below

Define_Com Class(#Prim_Tre<#MyTreeDesign>) Name(#Tree)
 

Because of the overhead of making a reusable part instance compared to a simple item for a tree view (#Prim_TRVW) or list view (#Prim_LTVW), UDCs are not designed to be used with many thousand items.  For high volume scenarios, other techniques are recommended.