Re: [gnome-love] Expanders in GtkTree* from GTK+ 2.0



Thomas Broyer <tbroyer ltgt net> writes:

Hi,

According to Miguel's last mail, it seems gnome-love is really the place
for my question.

I'm currently learning the GTK+ 2.0 new API (from gtk+-1.3.5) and
particularly the GtkTree* part.

First, I create a GtkTreeStore and populate it with data. Then I create a
GtkTreeView with that model, and a GtkCellRendererText I use in three
GtkTreeViewColumn, which ones are appended to the view.
Well, as shown in the example of the gtk-doc, adding data to the tree.

Then I show all this stuff.

Here comes the question/problem: the tree expander arrows are always on the
first column, is there a way to have them in another column AND follow that
column when I drag&drop it?
I can't find any relevant function.

I found gtk_tree_view_set_expander_column (not documented) which allows to
specify the *visual* column where to draw the expander arrows, not the
*logical* column: when a drag&drop a column, the expanders don't follow it.
(and is this the expected behaviour or is this a bug?)

I'm not sure which makes more sense -- the expander set in a location in
the view, or on a particular column.  I was toying with the idea of
making it column based, but that would make people who want the expander
always left justified have to listen to "columns_changed" and move the
expander.

If you want to change the behavior, you can listen to that signal and
set_expander_column to the correct column.

Thanks,
-Jonathan





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