in reply to MListbox - please help

To extend the last column:
#!/usr/bin/perl use strict; use warnings; use Tk; use Tk::MListbox; my $mw = MainWindow->new(); $mw->geometry("900x500"); my $frame = $mw->Frame()->pack( -side=>'top', -fill=>'both', -expand=> +1); my $mlb = $frame->MListbox()->pack(-side=>'top', -fill=>'both', -expan +d=>1); $mlb->columnInsert(0, -text=>'count'); $mlb->columnInsert(1, -text=>'date'); $mlb->columnInsert(2, -text=>'size')->pack(-expand => 1); MainLoop;

Replies are listed 'Best First'.
Re^2: MListbox - please help
by zentara (Cardinal) on Feb 13, 2010 at 12:58 UTC
    On my Perl 5.10, and latest Tk, you need to click on the 'size' header to actually get it to fill in the $mw after it opens. A hack to get around it, is to set a very high width for that column, and let it fill in from the right side.

    There may be a better way. :-)

    $mlb->columnInsert(2, -text=>'size', -width=>1000 )->pack(-expand => + 1);

    I'm not really a human, but I play one on earth.
    Old Perl Programmer Haiku
      Thanks for the tip. Extends the size header perfectly.