Re: Gtk2::SimpleList question..



On Tue, 2003-09-23 at 14:07, Jim Donoghue wrote:
my $sl = Gtk2::SimpleList->new('Name'=>'text','Address'=>'text');

But if I try to dynamically assign column names/types and pass those as
a variable to it, the columns get reordered.

That's the nature of Perl's hashes. You can't predict their order. To
achieve what you want, simply use an array instead of a hash.

  my @columns = (
       Name => 'text',
    Address => 'text'
  );

  my $sl = Gtk2::SimpleList->new(@columns);

HTH,
-Torsten




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