in reply to how to open a separate notepad
The following code allows a number of top level windows to be opened by clicking a button in the main window. A little work will get OP to creating a Text widget in each window to display the text files.
use strict; use warnings; use Tk; my $main = MainWindow->new; $main->Button (-text => "new window", -command => \&newTextWnd)->pack +(); MainLoop; sub newTextWnd { $main->Toplevel (); }
|
|---|