in reply to
Re: Perl Tk compound formatting
in thread Perl Tk compound formatting
Sorry to bother you again, but how to add a scrollbar to this since the number of buttons may disappear off the page.
I see that you have aded a mainwindow and a child window (somehow). I have tried the following code to create a scrollbar, but it only appears in the main window where there are no buttons displayed, rather than the child window:
my $scrollbar = $mw->Scrollbar( );
my $lb = $mw->Listbox(-yscrollcommand => ['set' => $scrollbar]);
#Configure the Scrollbar to talk to the Listbox widget
$scrollbar->configure(-command => ['yview' => $lb]);
#Pack the Scrollbar first so that it doesn't disappear when we resize
$scrollbar->pack(-side => 'right', -fill => 'y');
$lb->pack(-side => 'left', -fill => 'both');
How to get this scrollbar to appear alongside the buttons that are listed in the child window?