Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
#!perl
use strict;
use Tk;
my $mw1 = MainWindow->new;
$mw1->configure(-title=>"perl GUI",
-background=>'light grey');
$mw1->geometry('400x245+300+100');
my $fr1 = $mw1->Frame( -relief=>'raised',
-borderwidth=>2,
-background=>'light grey')
->pack(-side=>'top', -fill=>'x');
$fr1->Button(-text=>'Exit',
-command=>sub{exit})
->pack(-side=>'right');
$mw1->Label(-text=>'Use this button to pop another window',
-background=>'light grey')
->pack(-side=>'top', -fill=>'x');
my $fr2 = $mw1->Frame(-relief=>'raised',
-borderwidth=>2,
-background=>'light grey')
->pack(-side=>'top');
$fr2->Button(-text=>'Pop another window',
-command=>\&new_win )
->pack(-side=>'bottom');
MainLoop;
#----------------------------------------------------------
sub new_win
{
my $mw2 = MainWindow->new;
$mw2->configure(-title=>"perl GUI",-background=>'light grey');
$mw2->geometry('100x100+300+100');
$mw2->Button(-text=>'OK', -command=>sub{ $mw2->destroy } )
->pack(-side=>'bottom');
}