-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of
listmail
Sent: March-14-09 9:34 AM
To: Daniel Burgaud
Cc: Perl-Win32-Users
Subject: Re: Q: How to resize TK window panels
Daniel Burgaud wrote:
> Hi,
>
> I have the following Perl Script. It displays two Scrolled Text Left
> and Right.
> My problem is, how to resize the widths of the panels.
> Is there a switch that will automatically adjust the width or I
> manually dragging
> the edges?
>
A cleaner solution is to use a Panedwindow instead of an Adjuster.
Panedwindows began in the 804 series. If you need backwards compatibility
the by all means go with the Adjuster. Also - I'm not sure why you have the
while loop at the bottom of your code. Tk::MainLoop is what you want to use.
Here is a simple example:
###################
use Tk;
use strict;
my $mw=tkinit;
$mw->minsize(630,500);
my $pw = $mw->Panedwindow(
-showhandle=>1,
-sashpad=>6)->pack(-fill=>'both', -expand=>1);
my $t1 = $pw->Scrolled('Text',-scrollbars=>'ose');
my $t2 = $pw->Scrolled('Text',-scrollbars=>'ose');
$pw->add($_) foreach ($t1,$t2);
MainLoop;
###################
__END__
Jack
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs