Re: user-defined data types & GtkListStore



On Thu, Apr 10, 2003 at 11:03:27AM -0400, Owen Taylor wrote: 
The approach I always seem to be advocating here for doing TreeViews is:

 - Put only a single column in the store, of type G_TYPE_POINTER,
   or if you want to get a little fancier, of a boxed type you register,
   and in that column, store a pointer to the application data structure
   that each row corresponds to.

 - Use gtk_tree_view_column_set_cell_data_func() to set the attributes
   on the cell renderers for display.

Also worth pointing out, there's an example of this in gtk-demo.

Havoc



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