Re: [gtkmm] TreeView




p_treeview->get_column(0)->add_attribute(p_treeview->get_column_cell_renderer(0),"background_gdk",5);


That was it, thanks - though it needed a liitle bit derefferencing *(p_treeview->get_column_cell_renderer(0))

I have noticed that you are doing it a little bit different way - I have to read it through once again.



As for Glib::ArrayHandle - don't worry about destroying it, it'll handle
itself quite adequately. To use one when it's the return value of a
function, just assign it to an STL container like vector<T> or list<T>,
the conversion will happen automatically. Then obviously the resulting STL
class is your problem with regards to memory management. Unlike GTK+'s C
API though, gtkmm programmers don't have to explicitly destroy anything at
all that I'm aware of. Certainly not ArrayHandles.



Well if you say so, I have just read this in API reference:

]Glib::ListHandle<CellRenderer*> ]Gtk::TreeViewColumn::get_cell_renderers()

]Returns a newly-allocated G::List of all the cell renderers in the ]column, in no particular order.

]The list must be freed with Glib::list_free().
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

]Returns:
]    A list of Gtk::CellRenderers.


A was puzzeled becouse no such list_free() method could be found ;-)

Once again thanks - no it works as it should

Sebastian




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