Patrik Hasibuan schrieb:
> Dear my friends,
>
> I don't understand why my scrollbar does not appear in my Listbox.
>
> Please tell me my mistake.
>
Hi,
it's much more convenient to use the 'Scrolled' method to create a scrolled
widget:
use strict;
use warnings;
use Tk;
my $mw=MainWindow->new;
my $layarutama=$mw->title("arsipan in GUI");
my $labelkatakunci=$mw->Label(
-text => "Type-in the keyword: "
)->grid(
-row => 0,
-column => 0,
-sticky => 'e'
);
my $katakunci;
my $entrykatakunci=$mw->LabEntry(
-textvariable => \$katakunci,
-state => 'normal',
-width => 50,
-font => 'ArialBlack',
-foreground => 'green',
-takefocus => 1
)->grid(
-row => 0,
-column => 1,
-sticky => 'w'
);
my $tombolcari=$mw->Button(
-text => "Find up",
-command => sub{ }
)->grid(
-row => 1,
-column => 0
);
my $tombolkeluar=$mw->Button(
-text => "Quit",
-command => sub{ exit }
)->grid(
-row => 1,
-column => 1
);
my $lbsqlcari=$mw->Scrolled('Listbox',
-width => 140,
-scrollbars => 'oe',
)->grid(-row => 2,
-column => 0,
-columnspan => 2,
-sticky => 'nsew')->insert('end',0..19);
$mw->gridRowconfigure(2,
-weight => 1);
$mw->gridColumnconfigure(1,
-weight => 1);
MainLoop;
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/beginning_perl_tk/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/beginning_perl_tk/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:beginning_perl_tk-digest@xxxxxxxxxxxxxxx
mailto:beginning_perl_tk-fullfeatured@xxxxxxxxxxxxxxx
<*> To unsubscribe from this group, send an email to:
beginning_perl_tk-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|