Hi, The code below creates a status bar with 3 parts. If run in the samples directory, will place an icon in one of the parts.
Cheers, jez. ================ use Win32::GUI; use strict; my $Icon = new Win32::GUI::Icon("camel.ico"); my $W = new GUI::Window( -title => "Win32::GUI::status test", -left => 100, -top => 100, -width => 300, -height => 200, -name => "Window", ); my $status=$W->AddStatusBar( -name => "Status", ); $status->Parts(70,200,-1); #three parts $status->PartText(0,'Part 1'); #set the text $status->PartText(1,'Part 2'); $status->Icon(2,$Icon); #set the icon $W->Show; Win32::GUI::Dialog; ----- Original Message ----- From: "Chris Wearn" <[EMAIL PROTECTED]> To: <perl-win32-gui-users@lists.sourceforge.net> Sent: Monday, January 19, 2004 6:29 AM Subject: [perl-win32-gui-users] Statusbar example > Hi All > > Having trouble with the new Statusbar additions: > > tried different combinations of PARTS to start dividing, but no matter what > I've tried nothing seems to work. What order do the methods need to be > called? > > I've had a look at MSDN Status Bars and read the notes that Steve posted on > announcing the enhancements. Confused in that MSDN says that Parts is > (nParts[array of widths]) > > I've tried $Window_Status->Parts([200,100,-1]); and > Parts(3,[200,100,-1]) > > Can someone add a few of the methods to the example below. > > Chris > > > # ============================ > > use Win32::GUI; > > my $Window = new GUI::Window( > -title => "Statusbar example", > -left => 100, > -top => 100, > -width => 400, > -height => 200, > -name => "Window", > -events =>{ > Terminate => sub { return -1 }, > } > ); > > # Add a Status Bar > my $Window_Status = $Window->AddStatusBar( > -name => "Window_Status", > -text => "Panel 1" > ); > > $Window->Show; > Win32::GUI::Dialog; > > > > ------------------------------------------------------- > 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