use strict; use warnings; use Tk; use Tk::FontDialog; my $mw=new MainWindow; $mw->Label(-text => "Test")->pack; $mw->Button(-text => "Another test")->pack; $mw->Button(-text => "Use Tk::FontDialog", -command => sub { my $font = $mw->FontDialog->Show; if (defined $font) { $mw->RefontTree(-font => $font); } })->pack; my $mess .= "\nAre these two customers the same?"; $mw->Button(-text => "Test messageBox", -command => sub { my $res = $mw -> messageBox( -title => "This is a test", -message => $mess, -type => 'yesno'); } )->pack; MainLoop;