in reply to Gtk3::SimpleList create personal type with 2 cells in same column
Gtk3::SimpleList->add_column_type('image_text', type => 'Glib::Scalar', renderer => 'Gtk3::CellRendererText', attr => sub { my ($treecol, $cell, $model, $iter, $col_num) = @_; my $pixrd = Gtk3::CellRendererPixbuf->new(); my $txtrd = Gtk3::CellRendererText->new(); $treecol->clear(); $treecol->pack_start($pixrd,0); $treecol->pack_start($txtrd,1); $treecol->add_attribute($pixrd,'pixbuf',1); $treecol->add_attribute($txtrd,'markup',2); } ); # Create your model my $slist = Gtk3::SimpleList->new ( 'Text Field' => 'text_icon', 'text' => 'markup', 'icon' => 'pixbuf', ); # Hide text and icon my @col = $slist->get_columns; $col[1]->set_visible(0); $col[2]->set_visible(0);
|
|---|