Re: [gtkmm] TreeModelColumn associated with a TreeViewColumn ?

On Fre, 2003-01-10 at 17:02, Liza Klerck wrote:

> Ok here is an example of why I need to know which Gtk::TreeModelColumn
> is accociated with a specific Gtk::TreeViewColumn: 
> Let's say I have a treeview with 3 columns column_a, column_b and
> column_c; 
> I register for button_press_events in the TreeView so that when a user
> presses the mouse button in the column_b I want to call function
> do_column_b(row) 
> when he clicks in column_c I want to call function do_column_c(row)


Ahh.  What you are trying to do is using TreeView as a spreedsheet.  But
the problem is, it's simply not a spreedsheet.  A sign of that is that
signal_activate() works with rows, not cells.

You could probably do anyway what you're trying to do, by remembering
the view column <-> model column association yourself.  But I don't
think it's a good idea to do that.  You are breaking keyboard access,
for instance, since in your application someone has to use the mouse to
make something happen.

But perhaps I misunderstood again.  It might be possible that what you
really want is a custom cell renderer.  I don't know -- it would be
really helpful if you could tell us *what* your application is supposed
to do -- from a user perspective, without any code snippets of possible


(P.S.: It'd be cool if you could avoid sending HTML mail to the list. 
It's absolutely unnecessary, and lots of people have mail readers that
can't cope with HTML mail.)

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