jepri has asked for the wisdom of the Perl Monks concerning the following question:
My problem is that I can do this:
And I get a listbox which automatically resizes when the user resizes the $toplevel window. However, when I do this:my $widget=$toplevel->Listbox(-height=>0,-width=>0)->pack;
I get a listbox that fits neatly into the $toplevel window, but won't resize when I resize the $toplevel window.my $widget=$toplevel->Scrolled('Listbox', -scrollbars=>'e',-height=>0, + -width=>0)->pack;
I dove into the code for Tk, but it's pretty complicated (to me), and I couldn't even find where to start tweaking. I thought I found a routine in widget.pm, but when I started mucking with it, nothing changed. Does anyone have a solution (apart from fixed size listboxes)? I'd like to avoid binding a subroutine to the resize event on the parent window (if I can even do that in Tk).
____________________
Jeremy
I didn't believe in evil until I dated it.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Packing scrolled listboxes in Tk
by azatoth (Curate) on Jan 25, 2001 at 20:10 UTC | |
by jepri (Parson) on Jan 25, 2001 at 20:22 UTC | |
|
Re: Packing scrolled listboxes in Tk
by ichimunki (Priest) on Jan 25, 2001 at 20:49 UTC |