package main; use Tk; use Tk::ROText; use Tk::DialogBox; use Tk::FontDialog; #use Data::Dumper; our $VERSION = 0.1; # create the main window, a menu frame at top, a second scrollbar at right and a scrolled my $app; $app->{mw} = MainWindow->new( -title => "hugepad" ); $app->{menu} = $app->{mw}->Frame()->pack( -side => "top", -fill => "x" ); my $font; my $fd = $app->{mw}->FontDialog(-nicefont => 0, -title => 'Select Font', -applycmd => \&apply_font, ); $app->{fontbut} = $app->{menu}->Button(-text => 'Choose Font', -command => sub { $font = $fd->Show; apply_font($font); })->pack(-side => 'right');