code example for widget reuse



At the moment I'm attempting to write a new widget that mimics a
GtkTreeView, by having "expanded" rows show up as additional
GtkTreeViews, exactly like OS X's Finder does in column view.
Unfortunately, I can't seem to get the whole widget
creation/deletion/parent/child thing down.

To keep things simple I store everything in the background as a list
of GtkTreeViews and then generate the view based on this list.
However, I can't seem properly remove and readd the tree views. I
either get an error whenever I readd a tree view, or the view doesn't
even show up.

Rather than subjecting the list to my code, I'm simply going to ask if
anyone knows of any good code examples that have this kind of dynamic
recreation/deletion/regeneration of views or a good example of how to
reuse a widget.

Barring that, what is the proper way to reuse a widget without having
things break horribly?

Mark Kegel



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