From: Frazier, J. J. <Joe.Frazier@Peopleclick.com> - 2006-12-15 13:52:48
|
Not sure about bitmaps, but you can use the standard progress bar control in a statusbar using the parts paradigm. See the sample StatutBar2.pl. I have included it here in case it has changed or is no longer included with the samples: use Win32::GUI; use Time::HiRes qw( time ); my $window =3D new Win32::GUI::Window( -name =3D> "main", -text =3D> "Status Progress", -size =3D> [300,300], -pos =3D> [100,100], -onResize =3D> \&main_resize ); my $status =3D new Win32::GUI::StatusBar($window); $status->Parts(200,-1); my $progress =3D new Win32::GUI::ProgressBar($status, -smooth =3D> 1); $progress->SetRange(0,1000); $window->Show; while(Win32::GUI::DoEvents() !=3D -1) { $progress->SetPos( int((1 + sin(time)) * 500) ); } sub main_resize { $status->Width($window->ScaleWidth); $status->Top($window->ScaleHeight - $status->Height); my($left,$top,$right,$bottom) =3D $status->GetRect(1); $progress->Left($left); $progress->Top($top); $progress->Width($right - $left); $progress->Height($bottom - $top); } -----Original Message----- From: per...@li... [mailto:per...@li...] On Behalf Of Steve Loughran Sent: Friday, December 15, 2006 07:53 To: per...@li... Subject: [perl-win32-gui-users] Bitmap image in the statusbar? Hi all A crazy thought, but... is it possible to draw a bitmap into the status bar of a window? I want to have some kind of graphical "status"=20 indicator (alongside the text in the status bar).... any ideas? Or should I just drop this idea and get on with something else instead? :) Steve ------------------------------------------------------------------------ - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDE V _______________________________________________ Perl-Win32-GUI-Users mailing list Per...@li... https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users http://perl-win32-gui.sourceforge.net/ |
From: Jason P. <jp...@un...> - 2006-12-15 15:31:42
|
You could always write a custom extension to allow for the use of a bitmap in the status bar. You would have to do a lot of the back end coding (drawing msgs etc) but hey, ANYTHING is technically possible ;) ;) Jason Plum Frazier, Joe Jr wrote: > Not sure about bitmaps, but you can use the standard progress bar > control in a statusbar using the parts paradigm. See the sample > StatutBar2.pl. I have included it here in case it has changed or is no > longer included with the samples: > > use Win32::GUI; > use Time::HiRes qw( time ); > > my $window = new Win32::GUI::Window( > -name => "main", > -text => "Status Progress", > -size => [300,300], > -pos => [100,100], > -onResize => \&main_resize > ); > > my $status = new Win32::GUI::StatusBar($window); > > $status->Parts(200,-1); > > my $progress = new Win32::GUI::ProgressBar($status, -smooth => 1); > > $progress->SetRange(0,1000); > > $window->Show; > > while(Win32::GUI::DoEvents() != -1) { > > $progress->SetPos( int((1 + sin(time)) * 500) ); > } > > sub main_resize { > $status->Width($window->ScaleWidth); > $status->Top($window->ScaleHeight - $status->Height); > my($left,$top,$right,$bottom) = $status->GetRect(1); > $progress->Left($left); > $progress->Top($top); > $progress->Width($right - $left); > $progress->Height($bottom - $top); > } > > -----Original Message----- > From: per...@li... > [mailto:per...@li...] On Behalf Of > Steve Loughran > Sent: Friday, December 15, 2006 07:53 > To: per...@li... > Subject: [perl-win32-gui-users] Bitmap image in the statusbar? > > Hi all > > A crazy thought, but... is it possible to draw a bitmap into the status > bar of a window? I want to have some kind of graphical "status" > indicator (alongside the text in the status bar).... any ideas? Or > should I just drop this idea and get on with something else instead? :) > > Steve > > ------------------------------------------------------------------------ > - > Take Surveys. Earn Cash. Influence the Future of IT Join > SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDE > V > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Per...@li... > https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users > http://perl-win32-gui.sourceforge.net/ > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Per...@li... > https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users > http://perl-win32-gui.sourceforge.net/ > > > > |