my $button1 = $mw->Photo(-data => &encoded_but1, -format => 'gif'); my $button2 = $mw->Photo(-data => &encoded_but2, -format => 'gif'); my $button3 = $mw->Photo(-data => &encoded_but_exit1, -format => 'gif'); my $button4 = $mw->Photo(-data => &encoded_but_exit2, -format => 'gif'); my $but1 = $c->createImage(40, 400, -image => $button1, -anchor => 'nw', -tags => ['but1']); $c->bind( $but1, '', sub {$c->itemconfigure( $but1, -image => $button2); }); $c->bind( $but1, '', sub {$c->itemconfigure( $but1, -image => $button1); }); $c->bind( $but1, '', sub{ &tabbed; } ); my $but2 = $c->createImage(450, 400, -image => $button3, -anchor => 'nw', -tags => ['but2']); $c->bind( $but2, '', sub {$c->itemconfigure( $but2, -image => $button4); }); $c->bind( $but2, '', sub {$c->itemconfigure( $but2, -image => $button3); }); $c->bind( $but2, '', sub { &disconnect; $mw->fontDelete('info_rus'); $mw->fontDelete('ticks'); $mw->fontDelete('bar_rus'); $mw->fontDelete('dial_rus'); exit; });