-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',
);
}
|