[gtkmm] add a button into a TreeModel of Treeview ???



Hello!
i ve a problem with a Gtk::TreeModel::ColumnRecord: i want to put a button in it, but i don t manage to do it! :'( i can add an Estimate* (ptr on an instance of my Estimate class), but not a Gtk::Button or a Gtk::Button* ?!?

in my EstimatesList.hh:
===================================================================
in my EstimatesList class:
   ...
   class EstimateColumns : public Gtk::TreeModel::ColumnRecord
   {
       public:
       EstimateColumns()
       {
           add(estimate_instance);
           add(designation);
           add(update);
       }

       Gtk::TreeModelColumn<Estimate*> estimate_instance;
       Gtk::TreeModelColumn<Glib::ustring> designation;
       Gtk::TreeModelColumn<Gtk::Button> update_button;
       Gtk::TreeModelColumn<Gtk::Button*> update_button_ptr;
   };
   EstimateColumns estimateColumns;

===================================================================

i found no appropriate examples with something else than "int" or "ustring" in the treemodel columns. i ve tried to learn about cellrenderers, but it s not clear enough for me :-[

if someone could explain me how to do, i would be grateful! :)
best regards,
cedric



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