Hi Jez

Ok, noted. Interesting. I'll look into this on Monday.

Steve

----- Original Message ----- 
  From: Jez White 
  To: Win32-GUI 
  Sent: Sunday, February 15, 2004 10:07 AM
  Subject: [perl-win32-gui-users] Status bar Parts method bug.


  Hi,

  I've found a bug when using the parts method in the status bar control. All 
the following statements fail (no error, application just exits):

    $status->Parts($width-200,$width-100,-1);
    my $temp=$status->Parts($width-200,$width-100,-1);
    my @temp=$status->Parts($width-200,$width-100,-1);

  While the following works:

   print $status->Parts($width-200,$width-100,-1);
   foreach ($status->Parts($width-200,$width-100,-1)) {print "$_ \n";}

  See example below. I've created a task in the tracker.

  Cheers,

  jez.

  =====================================
  use Win32::GUI;
  use strict;
   
   my $W = new GUI::Window(
      -title    => "Win32::GUI::status test",
      -left     => 100,
      -top      => 100,
      -width    => 300,
      -height   => 200,
      -name     => "main",
      -onResize => \&main_resize
  );
   
  my $status=$W->AddStatusBar(-name   => "Status");

  $status->Parts(50,100,-1);
  $status->PartText(0,'Lots of text');
  $status->PartText(1,'Part 1');
  $status->PartText(2,'Part 2');

  $W->Show;
   
  Win32::GUI::Dialog;

  sub main_resize {
   $status->Width($W->ScaleWidth);
   $status->Top($W->ScaleHeight - $status->Height);
   my $width=$status->Width;
   #The following work:
   print $status->Parts($width-200,$width-100,-1);
   #foreach ($status->Parts($width-200,$width-100,-1)) {print "$_ \n";}
   #The following fail:
   #$status->Parts($width-200,$width-100,-1);
   #my $temp=$status->Parts($width-200,$width-100,-1);
   #my @temp=$status->Parts($width-200,$width-100,-1);

  }



Reply via email to