ff has asked for the wisdom of the Perl Monks concerning the following question:
My problem: When I use the coordinates from my rows and columns as they appear on the spreadsheet, Tk seems to ignore all the "padding" I am trying to build in for my widget. It seems to collapse the widget's size, showing only the amount necessary to display the text label of the widget. Ideally, layout would appear exactly as on my spreadsheet, with all my row and column sizings using uniform units of space. For example, I display a button via the following:
$Output_b->grid( -column => 5, -row => 10, -columnspan => 4, -rowspan => 6, -sticky => 'nsew', );
but the output doesn't look at all like a 4x6 button. I'm considering putting empty widgets on rows 10 - 15 to make grid willing to span the six rows, but that doesn't seem like the proper way.
After this 'grid' section I have:
my ($cols, $rows) = $tl->gridSize(); for (my $i = 0; $i < $cols; $i++) { $tl->gridColumnconfigure($i, -weight => 1); } for (my $i = 0; $i < $rows; $i++) { $tl->gridRowconfigure($i, -weight => 1); }
which I thought would solve my problem but I can't tell as this does much. One of the button's text is not clipped and the buttons seem a little more uniform in the height of their rows, but....
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Want Tk to fully display 4x6 widget w/ grid instead of collapsing it
by Rich36 (Chaplain) on Oct 24, 2002 at 21:45 UTC | |
by ff (Hermit) on Oct 25, 2002 at 03:06 UTC | |
Want Tk to fully display 4x6 widget w/ grid instead of collapsing it
by rbc (Curate) on Oct 24, 2002 at 20:55 UTC | |
by ff (Hermit) on Oct 24, 2002 at 21:09 UTC | |
Re: Want Tk to fully display 4x6 widget w/ grid instead of collapsing it
by physgreg (Scribe) on Oct 25, 2002 at 13:04 UTC | |
by ff (Hermit) on Oct 25, 2002 at 14:11 UTC |