Hi ...
I have been beating round the bush for this silly prob. for quite a while; maybe itz time I ask the experts. I am working on TK and wanted my application window to be 500 pixel wide and of 500 height; so that the UI is not all cramped for space.
I wrote the foll. code and the application window becomes of this size:-
********************************
use Tk;
use strict;
use warnings;
my $MW = MainWindow-> new();
use strict;
use warnings;
my $MW = MainWindow-> new();
my $hello = $MW->Button( -text => 'Exit',
-command => sub {print STDOUT "**********EXITing*******"; exit;} );
$hello->pack;
my $c = $MW->Canvas(-width => 500, -height => 500);
$c->pack;
-command => sub {print STDOUT "**********EXITing*******"; exit;} );
$hello->pack;
my $c = $MW->Canvas(-width => 500, -height => 500);
$c->pack;
MainLoop;
*************************
But when i add one more button to the *canvas*, the application window becomes tiny. This is the code for a new button:-
my $jr_hello = $c->Button(-text => 'hi master');
$jr_hello->pack;
$jr_hello->pack;
Q.1. How should I keep my application-window-size to 500 x 500, even if a new button is added??
Best Regards,
Ukh
Stay in the know. Pulse on the new Yahoo.com. Check it out.
_______________________________________________ ActivePerl mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
