Subject RE: [IBO] TIB_Treeview, how do I use it.
Author Jason Wharton
This was a user contributed piece of code so I'm not as familiar with it as
the other control I have written. I think it is in an incomplete state or
at lease it may need some polish work done to be more user friendly.
Perhaps that is something you could look into providing?

Jason Wharton
www.ibobjects.com


> -----Original Message-----
> From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com]On
> Behalf Of Carl Zmola
> Sent: Tuesday, July 05, 2005 10:41 PM
> To: IBObjects@yahoogroups.com
> Subject: Re: [IBO] TIB_Treeview, how do I use it.
>
>
> Answering some of my own question: (for the archives)
>
> Carl Zmola wrote:
>
> > The tib treeview seems a little strange to me. I am looking for a
> > treeview that will display a hierarchy for a table with an (ID,
> > PARENTID, TITLE). This appears to be what the TIB_TREEVIEW
> should do,
> > but:
> >
> > 1) I am forced to call loaddata to actually load it.
> > 2) loadData can not be called twice.
> > 3) if LoadData is called twice, it appears to leak the
> 'data' pointer
> > associated with the node.
> >
> > Is there a good example for this control?
> >
> I have a simple table:
>
> ID PARENTID TITLE DESCRIPTION
> 1 0 Root
> 2 1 child1
> 3 1 abraham
>
> and set the IB_TREEVIEW1 properties
>
> ROOTID :=0;
> Field_Data :='title';
> Field_Key := 'id'; // is stored in a the data pointer of the
> TTReeNode.
> Field_Master := 'ParentId'; // create the link to parent node;
> Field_selection:= ????; // not used if selectEnabled is false???
>
> I then can call the LoadData property and get a treeview like
> I expect.
>
> At least this gives me enough to get started. What else does this
> componet do?
>
> Carl
> zmola@...