#! /usr/bin/perl -w use strict; use warnings; use Tk; my $size = 12; my $main = new MainWindow(); $main->geometry('400x400+200+200'); my $font = $main->fontCreate( -size => $size, -weight => 'bold'); my $button; $button = $main->Button(-text => "+", -font => $font, -command => sub{ $button->configure( -font=> $main->fontCreate( -size => $size++, -weight => 'bold')), } ); $button->pack(); MainLoop;