* Demo Treeview (from scratch) through VFP Command Window * CREATE the form ofoo=CREATEOBJECT('form') ofoo.show * Add the Image List ofoo.addobject('ocxImageList','Olecontrol','MSComctlLib.ImageListCtrl.2') oIL=ofoo.ocxImageList oIL.imageheight=16 oIL.imagewidth=16 oIL.ListImages.Add(1,"CLOSED",LOADPICTURE("CLOSED.ICO")) oIL.ListImages.Add(1,"OPENED",LOADPICTURE("OPENED.ICO")) oIL.ListImages.Add(1,"ON",LOADPICTURE("ON.ICO")) oIL.ListImages.Add(1,"OFF",LOADPICTURE("OFF.ICO")) * Add the tree view ofoo.addobject('ocxTreeView','Olecontrol','MSComctlLib.TreeCtrl.2') oTV=ofoo.ocxTreeview oTV.Visible=.t. oTV.Height=ofoo.Height oTV.Width=ofoo.Width oTV.Style= 7 && tvwTreelinesPlusMinusPictureText oTV.Fullrowselect=.t. * Assign the imagelist as the treeview's imagelist oTV.ImageList=oIL * These are some sample DBFs I used - dept.dbf supplied parent nodes SELECT dept GO top oTV.Nodes.Add(,1,dept.dept_key,dept.dept_name,"CLOSED","OPENED") SKIP * .... empl.dbf supplied the children for the paren nodes. SELECT empl GO top oTV.Nodes.Add(empl.dept_key,4,empl.dept_key+empl.empl_key,empl.empl_name,"OFF","ON") SKIPLearning from command window is a pleasure reserved only for VFP!. It's also a good approach when debugging, or shopping for design ideas or workarounds.