column (re)sizing



Hello all,

I think I just figured out how to keep columns in a simplelist at a
(max) certain size unless resized by the user. After every "push",
resize them, like so:

sub push_stuff {
   push  @{ $slist->{data} },
           [ blah blah blah ];

   map { $_->set_fixed_width($size) } $slist->get_columns;
   map { $_->set_sizing('fixed') } $slist->get_columns;
   map { $_->set_resizable(TRUE) } $slist->get_columns;
}

So it works... but having to do this after every push makes me think
I'm not doing it properly or, at least, not the most effectively. I've
tried placing all those maps in the initial $slist setup, but it
doesn't seem to fly. Is there a better way, or should I just be happy
that this works?

If I'm not making sense, let me know - I have screenshots. :)

Thanks,
Dave M.



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