Hi,

The correct usage is:

$status->Parts(x1,x2,x3,x4,x5...);

I'm sorry if the docs were confusing. This takes a list, not a list reference. 
Also it does not take "widths", it takes the X co-ordinate of the right-hand 
edge of each part. This is true to the actual API functionality, which is kind 
of weird but is actually quite handy. So, to create 3 parts each of width 100 
pixels, you would use:

$status->Parts(100,200,300);

Hope that helps out,

Steve


> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of
> Chris Wearn
> Sent: 19 January 2004 06:30
> To: perl-win32-gui-users@lists.sourceforge.net
> 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
> 

Reply via email to