Re: user-defined data types & GtkListStore
- From: Havoc Pennington <hp redhat com>
- To: Owen Taylor <otaylor redhat com>
- Cc: Bryan Kubishta <bkubisht driscollinc com>, gtk-app-devel-list gnome org
- Subject: Re: user-defined data types & GtkListStore
- Date: Fri, 11 Apr 2003 00:59:04 -0400
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]