package crap; use strict; use warnings; use Wx qw[ wxPD_CAN_ABORT wxPD_APP_MODAL wxPD_ELAPSED_TIME wxPD_ESTIMATED_TIME wxPD_REMAINING_TIME ]; use base qw(Wx::ProgressDialog); sub new { my $class = shift; my $max = shift || 10; my $vars = (wxPD_CAN_ABORT| wxPD_APP_MODAL|wxPD_ELAPSED_TIME| wxPD_ESTIMATED_TIME| wxPD_REMAINING_TIME); my $this = $class->SUPER::new("xp6 progres ($max)", "the progress ($max)", $max, undef, $vars); $this->Show(1); return $this; } my $c = crap->new(); for(0 .. 10){ $c->Update($_,"the progress ($_/10)",); select undef,undef,undef,0.3; }