Hi, Yep you've made a slight error - you've neglected to tell the progressbar where to be. In my example, I had a resize event for the main window (though it could be for the statusbar if you like) that sets the position of the progress bar in the statusbar by getting the co-ordinates of the part it's supposed to be in, and moving and sizing it to sit in that part. If you implement a similar resize event, it should work.
Steve ----- Original Message ----- From: <[EMAIL PROTECTED]> Cc: <perl-win32-gui-users@lists.sourceforge.net> Sent: Wednesday, January 21, 2004 4:17 AM Subject: [perl-win32-gui-users] ProgressBar inside StatusBar dont work with Timer > This is modified example from Stephen Pick. > I replaced while(1) by Timer-Method. The ProgressBar > dont work with Timer. Have I made a mistake? > Or I can call ProgressBar only inside main loop? > > > #!perl -w > use strict; > use Win32::GUI; > my $window = new Win32::GUI::Window( > -name => "main", > -text => "Status Progress", > -size => [300,300], > -pos => [100,100], > ); > $window->AddLabel( -name=>'test', > -pos=>[10,10], > -size=>[100,100] > ); > my $status = new Win32::GUI::StatusBar($window); > > $status->Parts(200,-1); > > my $progress = new Win32::GUI::ProgressBar($status, -smooth => 1); > $progress->SetRange(0,50); > $progress->SetPos(25); > > my $t1 = $window->AddTimer('T1', 1000); > > $window->Show; > Win32::GUI::Dialog(); > > sub T1_Timer{ > my $random = int rand (50); > $progress->SetPos($random); > $window->test->Text($random); > } > > sub main_Terminate{ > return -1; > } > > > > ------------------------------------------------------- > The SF.Net email is sponsored by EclipseCon 2004 > Premiere Conference on Open Tools Development and Integration > See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. > http://www.eclipsecon.org/osdn > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Perl-Win32-GUI-Users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users >