Path: utzoo!attcan!uunet!tut.cis.ohio-state.edu!ucbvax!ANDREW.CMU.EDU!gk5g+ From: gk5g+@ANDREW.CMU.EDU (Gary Keim) Newsgroups: comp.soft-sys.andrew Subject: Re: help needed with arb/createcon (ADEW) problem Message-ID: Date: 22 Mar 90 19:11:06 GMT References: Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 33 Excerpts from misc: 22-Mar-90 help needed with arb/create.. Bill Schell@allegra.temp (1841) > However, after compiling and running this code, all I get is a blank window. > I know this code makes a proper tree, because if I put: > { struct im *im = im_Create(NULL); im_SetView(im, self->treeView); } > at the end, I get a second window with the tree in it. You've created the tree/treev correctly. You've created the nodes correctly. Then you must link the treev into the viewTree. Use LinkTree to attach it to its parent view: treev_LinkTree(self->treeView, self /*?*/); This version of the code should work: draw_tree(self) struct infuse *self; { struct tree_node *node; self->tree = tree_New(); self->treeView = treev_New(); treev_SetDataObject(self->treeView, self->tree); node = tree_CreateRootNode(self->tree, "Root Node", 0); tree_CreateChildNode(self->tree, "Child 1", 1, node); tree_CreateChildNode(self->tree, "Child 2", 2, node); treev_LinkTree(self->treeView,self ) ; } Gary Keim ATK Group