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

I have a MainWindow loaded with widgets, but I would like the whole thing to scale down/up when the window is resized. Does anyone know if/how this can be done???

Thanks
001011110

Replies are listed 'Best First'.
Re: Scaling A TK Widget
by redmist (Deacon) on Jul 18, 2000 at 03:23 UTC
    I think that one reason people might be voting you down is that it would be helpful to provide a snippet of the applicable code so, for example, we could know what parameters you were giving to pack. Also, perhaps if you told us what you already tried, so you would not get recommendations that you have already tried out.

    redmist
    redmist.dyndns.org
    redmist@users.sourceforge.net
Re: Scaling A TK Widget
by eduardo (Curate) on Jul 18, 2000 at 04:09 UTC
    basically, the best reason that i can see for knocking this post down a notch is the fact that as far as questions go, this is a very vaugely phrased proposition! Were you to change this post to have a structure such as...

    I am using PerlTk, and I have designed this particular window with this code (insert code here...) I am using the pack layout manager, with these parameters... for some reason, under X, it does not seem to resize any widgets when the outside frame is streched. Does anyone know the events that I need to be catching in the event loop, or does anyone know of where any example code that deals with issues similar to these might be?

    I would be reticent to EVER vote a question phrased like that down... if you don't give us information, we can not help you...

Re: Scaling A TK Widget
by ase (Monk) on Jul 18, 2000 at 13:46 UTC
    I often use the standard $widget->pack() syntax with the -fill='x|y|both' param to achieve some level of resize control. I have read (From "Learning Perl/Tk") that the place widget manager might be better for fine grain control. Takes a little more work though to get the params right.
    Hope that helps a little,
    As the above posters have mentioned, an example would lend to a more precise solution:)
    -ase
Re: Scaling A TK Widget
by Macphisto (Hermit) on Jul 18, 2000 at 00:36 UTC
    Just for the record...I'd really appreciate knowing why I'm getting knocked down on this post ( or any post ). Please don't just vote negatively, and not tell me why.

    Thanks
    001011110 The beatings will continue until morale raises.