Re: save additional Information in Treestore/Liststore



Hi,

that was my first guess, but when I try, I get:
can't set value for column 5, model only has 5 columns at ...

I tried:

foreach my $file (@files) {
  my $iter = $self->{liststore}->append;
  $self->{liststore}->set($iter, map { $_ => "[$_]" } 1..5);
}

--Michael

Am Montag, 28. Mai 2007 12:30 schrieb Emmanuele Bassi:
On Mon, 2007-05-28 at 12:04 +0200, Michael Hartmann wrote:
Hi,

I want to create a list using Liststore that shows information about
images (filename, filesize, width, height...).
But as a filename isn't unique (e.g. same name for two files in different
directories), I need to store extra information in Liststore that
shouldn't be visible for the user in order to distinguish different files
with same names.

Any ideas?

any Gtk2::TreeModel implementation (Gtk2::ListStore, Gtk2::TreeStore and
other custom models) can have as many columns as you want; you don't
have to necessarily show them all inside a Gtk2::TreeView.

ciao,
 Emmanuele.



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