Re: custom treemodels and treeview padding
- From: "Jonathon Jongsma" <jonathon jongsma gmail com>
- To: bob fis-cal com
- Cc: gtkmm <gtkmm-list gnome org>
- Subject: Re: custom treemodels and treeview padding
- Date: Fri, 16 Jun 2006 13:26:50 -0500
On 6/16/06, Bob Caryl <bob fis-cal com> wrote:
Just a shot in the dark here: Is your custom Gtk::TreeModel based on a
Gtk::TreeStore or a Gtk::ListStore? If it's a Gtk::TreeStore then I'd
guess that the "weird padding" is reserving space to place the expansion
toggle symbol for a row that is an expandable parent.
Once again, just a guess.
Bob Caryl
Neither. It's based on TreeModel (which is the base class / interface
for TreeStore and ListStore as well). But you're absolutely correct
-- it was set as the expander column. The GTK+ documentation says the
following:
-----
void gtk_tree_view_set_expander_column
(GtkTreeView *tree_view,
GtkTreeViewColumn *column);
Sets the column to draw the expander arrow at. It must be in
tree_view. If column is NULL, then the expander arrow is always at the
first visible column.
If you do not want expander arrow to appear in your tree, set the
expander column to a hidden column.
-----
http://developer.gnome.org/doc/API/2.0/gtk/GtkTreeView.html#gtk-tree-view-set-expander-column
So apparently I need to add a dummy column to my treeview, set it as
the expander column, and then hide it in order to make the expander
disappear? That seems a little bit odd, but it does work. The
disadvantage is that I have to do this any time I use my custom model
in a treeview. But I don't have to do that when I use a ListStore. I
wonder what it is about ListStore that tells the TreeView that there
is no need to reserve space for an expander... I'll keep looking into
it, but if anybody has any tips, let me know.
Anyway, thanks Bob. I just needed somebody to point out the obvious :)
Jonner
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]