Re: newbie questions on ctree widget



"Srinivasan, Rajagopalan  (IndSys, SalemVA)" <Rajagopalan Srinivasan indsys ge com> writes:

folks,

I did a search among the archives but I did not catch the drift of the old
discussions entirely.

My question is with the tree or ctree widget.

Is it possible to add children and leaf nodes dynamically. ie When the user
attempts to "expand" the node, I would like to find the children and add
them to the tree. Apparently it is possible. A reference to a program called
GMC was quoted but I could not relate it to any particular utility/program
that i could get a hold of.

It's possible, but it's painful.

You need to create dummy nodes where you have children, and fill them in
when the node is expanded.  gmc (GNOME's filemanager) indeed does this
in gtkdtree.c.  gmc is available in the mc package from cvs or
ftp://ftp.gnome.org/.

GTK+ 2.0 will have a much better way of solving this problem.

-Jonathan




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]