Summary

VLF Windows Application Development

Summary

VFW060 – Using a Tree View

Important Observations

  • All Visual LANSA list components control how the data is presented. The tree view displays a list as levels.
  • The tree view definition controls how the data is visualized. The order in which the data is added is not important.
  • A simple tree view (ViewStyle = unlevelled) displays one column for each level.
  • One or more columns must be defined as the Key Position for each level.
  • In this example the icons defined for each column (level) are fixed. If required, your application could set image properties after an entry is added. For example, use F2 Feature Help on a tree view component and drill down to examine #TRVW_1.CurrentItem.Image.

Tips & Techniques

  • A tree view which could contain a large number of entries should be filled on demand.
  • The ManageChildren = True property, deletes entries for the next level, when a level is closed.
  • All Visual LANSA list components are capable of holding many thousands of entries. However, from an efficiency and usability perspective, your application should control how much data is added to the list component.
  • Icon components are compiled into the application.
  • If the image file associated with an icon component is changed, you must recompile the application.

What You Should Know

  • How to implement a simple tree view (ViewStyle  =  levelled).
  • How to manage displaying detailed data for a selected level.
  • How to fill the tree view on demand.