use Tk; use Tk::DialogBox; use Tk::Dialog; use Tk::Label; use Tk::Entry; use Tk::Tree; use Win32::Process; my $Mainwindow = MainWindow->new; #? my $firstname = $Mainwindow->Entry (-width=>30); $firstname ->grid(-row => 0, -col => 1); #? my $groupstouserbutton = $Mainwindow->Button (-text => "add to groups", -command => sub { addgroupswindowmaker($firstname)}); $groupstouserbutton ->grid(-row=>19, -col=>1); #? my $quitbutton = $Mainwindow->Button (-text => "Quit", -command => [$Mainwindow => 'destroy']); $quitbutton ->grid(-row=>20, -col=>1); MainLoop; sub addgroupswindowmaker { $addgroupswindow = $Mainwindow->Scrolled(Toplevel, -scrollbars => 'osoe'); $addgroupswindow->title("Potato"); #? my $addgroupsbutton = $addgroupswindow->Button (-text => "Add", -command => sub { addgroups();$addgroupswindow => 'destroy'})->grid(-row=> $k,-col => "1"); my $cancelgroupsbutton = $addgroupswindow->Button (-text => "Done", -command => [$addgroupswindow => 'destroy'])->grid(-row=> $k,-col => "2"); } sub addgroups{ #? }