# this is an example script
#!perl -W
use strict;
use Tk;
my $safe=0;
sub newm {
if ($safe==0) {
$safe=1;
my $newm=new MainWindow;
my $but=$newm->Button(
-command=>sub{$safe=0;$newm->destroy;},
-text=>'OK2',
)->pack;
}
}
my $main=new MainWindow;
my $but1=$main->Button(
-command=>\&newm,
-text=>'OK',
)->pack;
MainLoop;
# the $safe is to make sure the 2nd window does not laod more then one at a time.
# The script loads a window with a button. Upon pressing the 'OK' button is loads another window. when you click on the 'OK2' button it destroys the 2nd window and goes back to the previous one. When pressing on the X on the 2nd window, and try to reload it, it doesn't do anything.
How can i get rid of the minimize,maximize,close buttons on a window or how to bypass this situation. Knowledge is the first step to Greatness!!!
#!perl -W
use strict;
use Tk;
my $safe=0;
sub newm {
if ($safe==0) {
$safe=1;
my $newm=new MainWindow;
my $but=$newm->Button(
-command=>sub{$safe=0;$newm->destroy;},
-text=>'OK2',
)->pack;
}
}
my $main=new MainWindow;
my $but1=$main->Button(
-command=>\&newm,
-text=>'OK',
)->pack;
MainLoop;
# the $safe is to make sure the 2nd window does not laod more then one at a time.
# The script loads a window with a button. Upon pressing the 'OK' button is loads another window. when you click on the 'OK2' button it destroys the 2nd window and goes back to the previous one. When pressing on the X on the 2nd window, and try to reload it, it doesn't do anything.
How can i get rid of the minimize,maximize,close buttons on a window or how to bypass this situation. Knowledge is the first step to Greatness!!!