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?
>
> thanks.
>
> Dan
>
> #######################################################################
> strict;
>
> require Win32::Console;    import Win32::Console;
> use Time::HiRes qw(time usleep);
> use Tk;
> require Tk::ROText;
>
>
> my $mw = MainWindow->new( );
>
> $mw->minsize(630,500);
> my %frames;
>
> $frames{'display'}    = $mw->Frame( -borderwidth => 2, )->pack( -side 
> => 'top', -expand => 1, -fill => 'both');
> $frames{'display-l'}    = $frames{'display'}->Scrolled    ('ROText', 
> -font => ['Courier', 9,'normal'], -relief => 'groove', -scrollbars => 
> 'e',)->pack( -side => 'left',  -expand => 1, -fill => 'both', );
> $frames{'display-r'}    = $frames{'display'}->Scrolled    ('ROText', 
> -font => ['Courier', 9,'normal'], -relief => 'groove', -scrollbars => 
> 'e',)->pack( -side => 'right', -expand => 1, -fill => 'both', );
>
> while (1) {
>     $mw->update();
>     usleep 50000;
> }
> #######################################################################
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Perl-Win32-Users mailing list
> Perl-Win32-Users@listserv.ActiveState.com
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
>   

I wasn't sure what you wanted, so I just added commented code that would 
maximize the window on startup and added a Tk Adjuster widget between 
the two "displays".  Other than that you could use GeometryRequest and 
any of the options you could add a Tk::Button to call a sub routine to 
other things that the window manager buttons don't cover.  HTH.

#! /opt/ActivePerl-5.8/bin
use strict;
use warnings;

require Win32::Console;
import Win32::Console;
use Time::HiRes qw(time usleep);
use Tk;
require Tk::ROText;
require Tk::Adjuster;
use Win32::GUI;

my $mw = MainWindow->new( );
#$mw->update;

$mw->minsize(630,500);
my %frames;

$frames{'displays'}    = $mw->Frame( -borderwidth => 2, )->pack( -side 
=> 'top', -expand => 1, -fill => 'both');
my $displayl=$frames{'displays'} = $mw->Scrolled ('ROText', -font => 
['Courier', 9,'normal'], -relief => 'groove', -scrollbars => 'e');
my $displayr=$frames{'displays'} = $mw->Scrolled ('ROText', -font => 
['Courier', 9,'normal'], -relief => 'groove', -scrollbars => 'e');
my $adj1=$frames{'displays'} = $mw->Adjuster();

$displayl->pack(-side => 'left', -expand => 1, -fill => 'both');
$displayr->pack(-side => 'left', -expand => 1, -fill => 'both');
$adj1->packAfter($displayl, -side => 'left');

#my $winH = hex($mw->frame);
#Win32::GUI::Maximize($winH);

while (1) {
    $mw->update();
    usleep 50000;
}


_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to