[gtkmm] TreeView: number of clicked column



Hi!

I have a TreeView and I'd like to click on one of its columns then do something depending on the column that was clicked.

I've found that I can do that by connecting to Gtk::TreeViewColumn::signal_clicked(), but then I have to connect each column to a different function, then call another general function with the column number.
I find it easy but some kind of weird and boring...

A good way to do that is to create an object inheriting from Gtk::TreeViewColumn and that will keep the column number and connect to signal_clicked(). Then it can catch the click signal and pass it with the column number to my general function.

Is there another quicker way to to that?
In gtk--1.2, you could connect to the CList::click_column signal that gived you the famous column number. Is it a functionnality that still need to be implemented in gtkmm2 or am I missing something?

Thanks a lot for all your time!

Christian Van Brussel

-- 
______________________________________________
http://www.linuxmail.org/
Now with e-mail forwarding for only US$5.95/yr

Powered by Outblaze



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