Inserting a Gtk::StockID image in a treeview cell
- From: Guillaume Radenne <guillaume radenne gmail com>
- To: gtkmm-list gnome org
- Subject: Inserting a Gtk::StockID image in a treeview cell
- Date: Mon, 5 Jul 2010 17:49:59 +0200
Hello,
I'm wondering how i can put a Gtk::StockID image in a treeview cell ?
I curently know how to put a png file (as an example) but i don't know how to do the same thing with an icon such as Gtk::StockID(Gtk::Stock::YES) ...
Here is what I have :
class ModelColumns : public Gtk::TreeModelColumnRecord
{
public:
ModelColumns() {
add(m_col_selected);
add(m_col_name);
add(m_col_state);
}
Gtk::TreeModelColumn<bool> m_col_selected;
Gtk::TreeModelColumn<Glib::ustring> m_col_name;
Gtk::TreeModelColumn < Glib::RefPtr < Gdk::Pixbuf > > m_col_state;
};
.....
row[mColumns.m_col_state] = Gdk::Pixbuf::create("/usr/share/icons/Human/32x32/actions/media-eject.png");
--
Guillaume Radenne
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]