That sounds great.  I am sure there are limits to what it can do.  It would be 
nice to have them fully documented along with some test cases ad you have 
suggested and volunteered for.
 

Joe Frazier, Jr.
Technical Support Engineer
Peopleclick Service Support

Tel:  +1-800-841-2365
E-Mail: mailto:[EMAIL PROTECTED]


-----Original Message-----
From: Jez White [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 14, 2004 5:00 AM
To: Frazier, Joe Jr; Peter Eisengrein; Win32-GUI
Subject: Re: [perl-win32-gui-users] The rebar control


Nice.
 
Had a little play - is there a way to add more than one control to a band? I 
also found a problem with adding a toolbar...
 
I'm thinking of adding documentation for this control, as well as creating a 
couple of examples (and tracker items for for various problems).
 
Thoughts?
 
jez.
 
 

----- Original Message ----- 
From: Frazier, Joe Jr <mailto:[EMAIL PROTECTED]>  
To: Peter Eisengrein <mailto:[EMAIL PROTECTED]>  ; Jez White <mailto:[EMAIL 
PROTECTED]>  ; Win32-GUI <mailto:perl-win32-gui-users@lists.sourceforge.net>  
Sent: Wednesday, January 14, 2004 5:05 AM
Subject: RE: [perl-win32-gui-users] The rebar control

This is SOOO cool:
 
 
#!perl -w
use Win32::GUI;
use strict;
use warnings;
 


my $W = new GUI::Window(
    -title    => "Win32::GUI::Rebar test",
    -left     => 100,
    -top      => 100,
    -width    => 300,
    -height   => 200,
    -name     => "Window",
    -events   =>{
   Terminate => sub { return -1 },
  }
);
 
#create an image list
 
my $IL = new GUI::ImageList(16, 16, 8, 3, 10);
my $IMG_ONE   = $IL->Add("d:\\perl\\scripts\\open.bmp");
my $IMG_TWO   = $IL->Add("d:\\perl\\scripts\\folder.bmp");
my $IMG_THREE = $IL->Add("d:\\perl\\scripts\\xmlfile.bmp");
 
#create a rebar control
 
my $rebar = $W->AddRebar(
    -name   => "Rebar",
    -bandborders => 1,
    -varheight => 0,
    -imagelist => $IL,
);
my $but = $W->AddButton(
-name =>"but",
-top => '1',
-left => '1',
-text => "TipTest",
-tip => "This is a Tip!",
-width => 25,
-height => 20,
);
my $txt = $W->AddTextfield(
-name =>"text",
-prompt => "Enter Text",
-top => '120',
-left => '1',
-text => "This is Text!",
-tip => "This is Text!",
-width => 150,
-height => 25,
);
$rebar->InsertBand (-text => 'one' , -image => $IMG_ONE);
$rebar->InsertBand (-text => 'two' , -image => $IMG_TWO);
$rebar->InsertBand (-text => 'thee', -image => $IMG_THREE);
 
$rebar->InsertBand (-text => 'Four',
  -child => $but,
  -width => 25,
  -minwidth => 25,
  -minheight => 20,
);
 
$rebar->InsertBand (-text => 'Four',
  -child => $txt ,
  -width => 25,
  -minwidth => 25,
  -minheight => 20,
);
print $rebar->BandCount,"\n";
#Below will crash...
#$rebar->BandInfo(0);
 
$W->Show;
 
Win32::GUI::Dialog;
 
Of course, not every control may work right, but this is definatly something to 
play with!!!!
 

Joe Frazier, Jr.
Technical Support Engineer
Peopleclick Service Support

Tel:  +1-800-841-2365
E-Mail: mailto:[EMAIL PROTECTED]


-----Original Message-----
From: Peter Eisengrein [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 13, 2004 8:27 PM
To: 'Jez White'; Win32-GUI
Subject: RE: [perl-win32-gui-users] The rebar control


Jez,
 
you're almost there!!! Change these lines:
 
$rebar->InsertBand (-text => 'one' , -image => 0);
$rebar->InsertBand (-text => 'two' , -image => 1);
$rebar->InsertBand (-text => 'thee', -image => 2);
 
to
 
$rebar->InsertBand (-text => 'one' , -image => $IMG_ONE);
$rebar->InsertBand (-text => 'two' , -image => $IMG_TWO);
$rebar->InsertBand (-text => 'thee', -image => $IMG_THREE);
 
-Pete

-----Original Message-----
From: Jez White [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 13, 2004 4:28 PM
To: Win32-GUI
Subject: [perl-win32-gui-users] The rebar control


Hi,
 
I've just spent some time getting to grips with the rebar control - and I 
didn't get very far:) 
 
I must be missing something simple, because I can't work out how to use this 
control. I've gone through the perl/XS code and MS docs and I'm still clueless. 
The example below (when run in the samples folder) creats a rebar, with 3 
bands. Each band has a text string and image. You can resize the rebar, move 
the bands by dragging and it all seems to work - but how do you add other 
buttons/controls? Calling the BandInfo method causes a crash.
 
Cheers jez.
 
===============
 
#!perl -w
use Win32::GUI;
use strict;
 
my $W = new GUI::Window(
    -title    => "Win32::GUI::Rebar test",
    -left     => 100, 
    -top      => 100, 
    -width    => 300, 
    -height   => 200,
    -name     => "Window",
);
 
#create an image list
 
my $IL = new GUI::ImageList(16, 16, 8, 3, 10);
my $IMG_ONE   = $IL->Add("one.bmp");
my $IMG_TWO   = $IL->Add("two.bmp");
my $IMG_THREE = $IL->Add("three.bmp");
 
#create a rebar control
 
my $rebar = $W->AddRebar(
    -name   => "Rebar",
    -bandborders => 1,
    -varheight => 1,
    -imagelist => $IL,
);
 
$rebar->InsertBand (-text => 'one' , -image => 0);
$rebar->InsertBand (-text => 'two' , -image => 1);
$rebar->InsertBand (-text => 'thee', -image => 2);
 
#Below will crash...
#$rebar->BandInfo(0);
 
$W->Show;
 
Win32::GUI::Dialog;

 
 
 

Reply via email to