Ace128 has asked for the wisdom of the Perl Monks concerning the following question:
But no luck. Well, the first buttons are changed, at starup, but not all. And the whole thing is too small. I also changed at around row 102:my $hdr = $f->HButton( -takefocus=>0, -padx=>0, -width=>1, -borderwidth=>2, -highlightthickness=>0 )->pack(qw/-side top -anchor n -fill x/); $hdr->GeometryRequest($hdr->reqwidth, 18); # Row 150, New! $hdr->update; # Row 151, New! $w->Advertise("heading" => $hdr);
But here it's just changed when I click or drag. I want it to be set at startup! Testcode:if (defined(my $pixels = $w->cget('-pixelwidth'))) { $w->GeometryRequest($pixels, 18); # 18 is New! Was $mw->re +qheight before }
Thanks,use Tk; use Tk::MListbox; use strict; use warnings; my $mw = new MainWindow(); my $frame = $mw->Frame(-bd => 2, -relief => 'raised')->pack(-expand => + 1, -fill => 'both'); my $scrolledMListbox = $frame->Scrolled( qw/MListbox -selectmode browse -scrollbars oe/ )->pack(-expand => 1, -fill => 'both'); my @list = ( "a", "b" ); $scrolledMListbox->columnInsert('end', -text => 'Path'); $scrolledMListbox->columnInsert('end', -text => 'Modified'); $scrolledMListbox->columnInsert('end', -text => 'Dir'); $scrolledMListbox->columnInsert('end', -text => 'File'); $scrolledMListbox->insert('end', [ "a", "b", "s", "l"] ); $scrolledMListbox->insert('end', [ "c", "d", "f", "e"] ); MainLoop;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Changing Buttonsize in MListbox
by zentara (Cardinal) on Sep 15, 2005 at 23:10 UTC | |
by Ace128 (Hermit) on Sep 16, 2005 at 02:04 UTC | |
by rcseege (Pilgrim) on Sep 16, 2005 at 06:59 UTC | |
|
Re: Changing Buttonsize in MListbox
by InfiniteSilence (Curate) on Sep 15, 2005 at 22:39 UTC | |
by Ace128 (Hermit) on Sep 15, 2005 at 23:01 UTC | |
|
Re: Changing Buttonsize in MListbox
by rcseege (Pilgrim) on Sep 16, 2005 at 18:15 UTC | |
by rcseege (Pilgrim) on Sep 16, 2005 at 22:47 UTC |