Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HELP With Tk function packForget()

Status
Not open for further replies.

gammaman64

Programmer
Apr 28, 2007
9
US
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)


}
 
From the `widget` demonstration program that comes with Tk:

Code:
my $b2 = $top->Button(-text => "Something Else Unexpected");
$b2->configure(-command => sub {$b2->destroy;});

It was under "Tix Widgets / Popup help window when mouse lingers over a widget"

(go into cmd prompt or terminal and type widget to run this program; it's got a whole lot of cool things Tk can do, along with source codes for it all)

-------------
Cuvou.com | The NEW Kirsle.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top