After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 89833 - The appearance of the TreeStore example in gtk-demo (in gtkmm) differs from the example in gtk+
The appearance of the TreeStore example in gtk-demo (in gtkmm) differs from t...
Status: RESOLVED FIXED
Product: gtkmm
Classification: Bindings
Component: TreeView
2.0
Other All
: Normal normal
: ---
Assigned To: gtkmm-forge
gtkmm-forge
Depends on:
Blocks:
 
 
Reported: 2002-08-04 11:12 UTC by Daniel
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Daniel 2002-08-04 11:12:03 UTC
I think the treestore example in gtkmm/demo/gtk-demo should look like the
corresponding demo in the gtk+ distribution. In the Gtkmm example there are
also toggle-cells on the rows there you have the months. In the Gtk+
example there are not toggle-cells on those rows. I have not managed to fix
this. It seems like there "should be" one more function to append rows to
the tree-store. The sample program uses: 

Gtk::TreeRow row = *(m_refTreeStore->append());

There should be some way to tell this function not to use all columns in my
model...

This may not be critical for functionality but it is critical for the user
experience.

Screenshot of Gtk+ sample program:
http://bart.sm.luth.se/~dansun-8/gtk_treestore.png

Screenshot of Gtkmm sample program:
http://bart.sm.luth.se/~dansun-8/gtkmm_treestore.png

I'm using gtkmm-1.3.18 and gtk+-2.0.5
Comment 1 Murray Cumming 2002-08-04 11:26:48 UTC
See line 310 of gtk+/demos/gtk-demo/tree_store.c.

They use an extra hidden "visible" column, which is linked to the
CellRenderer's "visible" property. We need to do that too, by
specifying a custom cell renderer, as described in the TreeView
chapter. Tell me if you have any problems doing that.
Comment 2 Daniel 2002-08-04 14:27:55 UTC
This was indeed really simple to fix, just change row 305 in
gtkmm/demos/gtk-demo/example_treeview_treestore.cc from:

  row[m_columns.visible]      = true;

to

  row[m_columns.visible]      = false;

I thought the visible attribute was used to determine if you could
toggle the "toggle cell renderer". My mistake...
Comment 3 Murray Cumming 2002-08-05 14:00:30 UTC
2002-08-05  Daniel  <dss@home.se>

	* demos/gtk-demo/example_treeview_treestore.cc: toggle boxes are
	no longer shown in parent rows - there is a hidden boolea column
	that is associated with the visible attribute of the cell renderers.