Perl Tk closing windows
- by guy ergas
in my perl tk script i have opened 2 windows and after a spacific button click i want to close one of them.
how can i do it?
code example:
main:
$main = new MainWindow;
$sidebar = $main-Frame(-relief = "raised",
-borderwidth = 2)
-pack (-side="left" ,
-anchor = "nw",
-fill = "y");
$Button1 = $sidebar - Button (-text="Open\nNetlist",
-command= \&GUI_OPEN_NETLIST)
-pack(-fill="x");
MainLoop;
sub GUI_OPEN_NETLIST
{
$component_dialog = new MainWindow;
$Button = $component_dialog - Button (-text="Open\nNetlist",
-command= close new window)
-pack(-fill="x");
MainLoop;
}