Unfortunately, (or fortunately :-) the widgets are not of consistent size and so -width does not look like it will be useful within -grid. (One other twist is that I have 'styles' of layout, such that the button's appearance varies from style to style.)

I do see that in configuring button $Output_b (and to handle multiple styles) I can do:

-height => $style eq 'workstation' ? 6 : 3, # style eq something else...

but now every other button on the same row as $Output_b has a minimum height of 3 text-rows (oops) and instead of fooling around with $Output_b's options I want to target all my adjustments within the -grid sections. I suppose I could throw in extra button configures as necessary within my -grid/style statement blocks, but ideally I shouldn't be distracted with altering other buttons as I configure the $Output_b button.

Instead I have gone ahead with configuring dummy cells (blank Label widgits) within the 'style' that needs it, i.e.:

my $cell_of_spaces = ' ' x 12; ## I've already set up the $Option_b button and am in the ## midst of configuring a "workstation" style/layout $Output_b->grid( -column => 5, -row => 9, -columnspan => 4, -rowspan => 6, -sticky => 'nsew', ); my $space_cell_col = 9; # column 9 already acted as a separator between two big # buttons, so no problem putting blank Labels here. foreach my $space_cell_row (9 .. 14) { build_blank_cell( $tl, $cell_of_spaces, $space_cell_col, $space_cell_row, ); } # Now that there are cells on each row between 9 and 14, # the $Output_b button's rowspan option takes full effect. sub build_blank_cell { my ( $tl, $cell_of_spaces, $space_cell_col, $space_cell_row ) = @_; my $new_label_widget_l = $tl->Label( -textvariable => \$cell_of_spaces, )->grid( -column => $space_cell_col, -row => $space_cell_row, -sticky => 'nsew', ); }

In reply to Re: Want Tk to fully display 4x6 widget w/ grid instead of collapsing it by ff
in thread Want Tk to fully display 4x6 widget w/ grid instead of collapsing it by ff

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.