Changing color of individual cells in a table



Hi...

I know this was discussed before, but somehow that didn't help me much, so here I am.  :)
Is there any way I could change the background color of an individual cell if I use the
following model in combination with ListStore:

  class ModelColumns : public Gtk::TreeModel::ColumnRecord {
  public:
    ModelColumns();

    Gtk::TreeModelColumn<Glib::ustring> m_1stColumn;
    Gtk::TreeModelColumn<Glib::ustring> m_2ndColumn;
    Gtk::TreeModelColumn<Glib::ustring> m_3rdColumn;
    Gtk::TreeModelColumn<Glib::ustring> m_4thColumn;
  };

  ModelColumns m_Columns;
and then 
   m_refTreeModel = Gtk::ListStore::create(m_Columns);
   m_TreeView.set_model(m_refTreeModel);
   ...................................................
   m_TreeView.append_column("", m_Columns.m_1stColumn);
   m_TreeView.append_column("", m_Columns.m_2ndColumn);
   m_TreeView.append_column("", m_Columns.m_3rdColumn);
   m_TreeView.append_column("", m_Columns.m_4thColumn);

(This should display a fixed-size table of strings).

Yes, I've seen this link: http://www.gtkmm.org/gtkmm2/docs/tutorial/html/ch08s02.html#id2880753
but I'm still not sure if this applies to my case.  Can someone please help me out?


Many thanks to each and all,

Nickolai Dobrynin



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