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;
In reply to Changing Buttonsize in MListbox by Ace128
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |