File: ...\Samples\Vfp98\Solution\OLE\Outline.scx
This sample shows two different types of ActiveX controls which you can use for outlining. In this sample, a directory structure is displayed. A custom method on the form named FillTree is called recursively to iterate through the entire tree structure.
The Outline control can be used for simple outlining, however, it does not offer the Windows 95 shell look available with the Treeview control. In addition, the Treeview control also allows display of images with each node.
You can add items to the outline control with the AddItem method. Indentation is handled through the Indent method which takes an index number representing the item to affect.
THIS.PageFrame1.Page1.OleOutline.AddItem(LOWER(m.path))
THIS.PageFrame1.Page1.OleOutline.Indent(m.cnt-1)= m.lvl
The new Treeview control can give your applications a truly genuine Windows 95 look. Unlike the Outline control which uses methods and item indexes, the Treeview control uses a Nodes collection.
Note To display images in a treeview control, you must add an ImageList control to the form.
* Add items to treeview control
o = THIS.PageFrame1.Page2.oleTreeview
IF cnt = 1
oNode = o.nodes.add(,1,LOWER(m.path)+"_",LOWER(m.path),,)
oNode.Image = "world" &&name of image
ELSE
oNode = o.nodes.add(m.pkey,4,LOWER(m.path)+"_",LOWER(m.path),,)
oNode.Image = "fldr" &&name of image
ENDIF