http://www.perlmonks.org?node_id=829223

cmv has asked for the wisdom of the Perl Monks concerning the following question:

Wise Monks-

I have need to create 2 widgets - one on top of the other. The bottom one's size needs to optionally be adjustable by the user. I want the adjuster to be in between the 2 widgets. When the whole window is resized, only the top widget should get bigger/smaller.

I've created a test case that does everything I want, but there is a bad side-effect. If you simply run this code, and move the adjuster up high enough - it disappears!

Can you help me find a way to make it stop doing that?

Thanks

-Craig

use strict; use warnings; use Tk; use Tk::Adjuster; my $t = MainWindow->new; my $f = $t->Frame(-background=>'green')-> pack(-expand=>1, -fill=>'both'); my $w1 = $f->Listbox(-background=>'blue')-> pack(-fill=>'both', -expand=>1, -anchor=>'n'); my $w2 = $f->Listbox(-background=>'yellow', -height=>3)-> pack(-side=>'bottom', -fill=>'both', -expand=>1, -anchor=>'n'); my $adj1 = $f->Adjuster(); $adj1->packAfter($w2, -side=>'bottom'); MainLoop;