pixbuf in a treestor
- From: The Saltydog <thesaltydog gmail com>
- To: Gtk-Perl-List <gtk-perl-list gnome org>
- Subject: pixbuf in a treestor
- Date: Thu, 23 Jun 2005 14:36:05 +0200
Is there some hidden trick I don't know, to display a pixbuf in a TreeStore??
This is what I did:
the model:
$model = Gtk2::TreeStore->new (qw/
Glib::String Glib::String Gtk2::Gdk::Pixbuf Glib::String
Glib::String Glib::String / );
set the column:
$cell = Gtk2::CellRendererPixbuf->new;
$col = Gtk2::TreeViewColumn->new;
$col->pack_start($cell,2);
$col->add_attribute ($cell, pixbuf => 0);
load the pixbuf:
$redbar=Gtk2::Gdk::Pixbuf->new_from_file(ICONPATH."red.png");
show data:
$model->set ($iter,0, $name 1, $fullpath,
2, $redbar, 3, $perc,
4, calc($size), 5, $size);
But the column with the pixbuf is empty. No errors, the "text" columns are ok...
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]