in reply to Changing Buttonsize in MListbox
or you can try to set a font size.#!/usr/bin/perl 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 => "\nPath\n"); $scrolledMListbox->columnInsert('end', -text => "\nModified\n"); $scrolledMListbox->columnInsert('end', -text => "\nDir\n"); $scrolledMListbox->columnInsert('end', -text => "\nFile\n"); $scrolledMListbox->insert('end', [ "a", "b", "s", "l"] ); $scrolledMListbox->insert('end', [ "c", "d", "f", "e"] ); MainLoop;
#!/usr/bin/perl use Tk; use Tk::MListbox; use strict; use warnings; my $mw = new MainWindow(); $mw->fontCreate('big', -family=>'arial', -weight=>'bold', -size=> 18 ); $mw->fontCreate('medium', -family=>'arial', -weight=>'bold', -size=> 14 ); my $frame = $mw->Frame(-bd => 2, -relief => 'raised')->pack(-expand => + 1, -fill => 'both'); my $scrolledMListbox = $frame->Scrolled( qw/MListbox -selectmode browse -scrollbars oe -font medium / )->pack(-expand => 1, -fill => 'both'); my @list = ( "a", "b" ); $scrolledMListbox->columnInsert('end', -text => "Path",-font => 'big' +); $scrolledMListbox->columnInsert('end', -text => "Modified",-font => 'b +ig'); $scrolledMListbox->columnInsert('end', -text => "Dir",-font => 'big') +; $scrolledMListbox->columnInsert('end', -text => "File",-font => 'big' +); $scrolledMListbox->insert('end', [ "a", "b", "s", "l"] ); $scrolledMListbox->insert('end', [ "c", "d", "f", "e"] ); MainLoop;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Changing Buttonsize in MListbox
by Ace128 (Hermit) on Sep 16, 2005 at 02:04 UTC | |
by rcseege (Pilgrim) on Sep 16, 2005 at 06:59 UTC |