gammaman64
Programmer
I am fairly new with Tk and I am trying to unpack the gui
when either yes or no are clicked, the problem I am having is that once they are packed I am finding it hard to
"command" a packed button. At the bottom is where I am trying to unpack the widget, when either yes or no are clicked. Here is the code snipet:
sub die{
my $boom = MainWindow->new(
-background=>'green');
my $label = $boom->Label();
my $yes = $boom->Button();
my $no = $boom->Button();
$label->configure(-text=>'DO you really want to quit?');
$yes->configure(-text=>'Yes');
$no->configure(-text=>'NO');
$label->pack();
$yes->pack();
$no->pack();
(UNPack $boom Upon Clicking YEs OR No)
}
when either yes or no are clicked, the problem I am having is that once they are packed I am finding it hard to
"command" a packed button. At the bottom is where I am trying to unpack the widget, when either yes or no are clicked. Here is the code snipet:
sub die{
my $boom = MainWindow->new(
-background=>'green');
my $label = $boom->Label();
my $yes = $boom->Button();
my $no = $boom->Button();
$label->configure(-text=>'DO you really want to quit?');
$yes->configure(-text=>'Yes');
$no->configure(-text=>'NO');
$label->pack();
$yes->pack();
$no->pack();
(UNPack $boom Upon Clicking YEs OR No)
}