in reply to Re: Tk Game - Image on Button
in thread Tk Game - Image on Button

Why specify the image size at all??? Works fine without.

Replies are listed 'Best First'.
Re^3: Tk Game - Image on Button
by zentara (Cardinal) on Nov 20, 2006 at 12:57 UTC
    As an added precaution to keep the grid intact when the second image is bigger than the first image. I made sure both images were sized right, so you could leave the button size options out. BUT, try loading a big image for the second image, and notice what happens when you specify button size, and not. When you do specify, the new big image will be contained and partially shown. When you don't, the whole grid gets re-arranged to accomadate the entire image.
    sub get_image2{ my $bunny = $top->Photo(-file => 'somebig.jpg'); + return $bunny; + }

    I'm not really a human, but I play one on earth. Cogito ergo sum a bum