Re: [gtkmm] Problem with Gdk::Pixbuf in Gtk::TreeView



Hi!

On Wed, Sep 03, 2003 at 09:51:53PM +0200, Martin Schulze wrote:
>>  /* FIXME: This relation causes errors */
>>  this->tree_view.append_column ("Icon", this->column_set.icon);
>>  /* This works. */
>>  this->tree_view.append_column ("Filename",
>>  this->column_set.filename);
>>  this->tree_view.append_column ("Size", this->column_set.size);
>>  this->tree_view.append_column ("UID", this->column_set.uid);
>>  this->tree_view.append_column ("GID", this->column_set.gid);
>>  this->tree_view.append_column ("Blocks", this->column_set.blocks);
>>  this->tree_view.append_column ("Hlink", this->column_set.hlink);
>>}

>> I figured out that the problem has something to do with the relation
>> of
>> the Gtk::TreeView::Column and the Gtk::ModelViewColumn. Because the
>> error messages appear even if I omit filling a
>> Glib::RefPtr<Gdk::Pixbuf>
>> into the store. If I create the Gtk::TreeView::Column manually with a
>> Gtk::CellRendererPixbuf without that relation, I don't get this error
>> message (but no pixbufs aswell, of corse).

> Try to append the manually created column and see if it works then.

I have tried, but like I said, the problem appears only if I establish
the connection between the Gtk::TreeView::Column and the
Gtk::ModelView::Column. For example this code does not generate errors:

  Gtk::CellRendererPixbuf *imagerenderer =
      Gtk::manage(new Gtk::CellRendererPixbuf);
  Gtk::TreeViewColumn* iconcolumn =
      Gtk::manage(new Gtk::TreeViewColumn("Icon", *imagerenderer));
  this->tree_view.append_column (*iconcolumn);

But I have no relation and no Pixbufs. This code does not work and
produces the same errors I was talking about:

  Gtk::TreeViewColumn* iconcolumn =
      Gtk::manage(new Gtk::TreeViewColumn("Icon", this->column_set.icon));
  this->tree_view.append_column (*iconcolumn);

I have also tried with ``tree_view.pack_start (...)'' but it does not
work, too.

Regards,


-- 
Simon Fuhrmann | NightSlayer at gmx.de | http://www.dismember.de
All people talk about the real life, but where can I download it?



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