use strict; use Win32::GUI; use constant COLOR => '#F4F2E8'; my ($redraw, $count); $count = 0; my $main = Win32::GUI::Window->new( -name => 'Main', -text => 'Redraw Test', -width => 200, -height => 100, -background => COLOR, -onTimer => \&redraw, ); my $arrow_font = Win32::GUI::Font->new( -name => "Wingdings", -size => 28, -bold => 1, ); $main->AddTimer( "redraw", 500 ); my $uparrow = $main->AddLabel( -text => ' ', -left => 55, -font => $arrow_font, -foreground => [255,0,0], -background => COLOR, -top => 10, ); my $dnarrow = $main->AddLabel( -text => ' ', -left => 55, -font => $arrow_font, -foreground => [0,255,0], -background => COLOR, -top => 10, ); $main->Show(); Win32::GUI::Dialog(); sub Main_Terminate { -1; } sub redraw{ $count++; if ($count%2){ $dnarrow->Text(chr(233)); } else {$uparrow->Text(chr(234));} }