in reply to Setting the minimum size of an autosized Tk widget
Here's my best guess.
#!/usr/bin/perl use strict; # https://perlmonks.org/?node_id=11139495 use warnings; use Tk; use Tk::BrowseEntry; my $top = MainWindow->new; my $f = $top->Frame; my $c1 = $f->BrowseEntry(-label => "Misc1:", -width => 0); $c1->pack(-fill => 'x', -expand => 1); $c1->insert("end", "0"); $c1->insert("end", "LargeButWillStillFitInTopWidgetAsItExpands"); my $c2 = $f->BrowseEntry(-label => "Misc2:", -width => 0); $c2->pack(-fill => 'x', -expand => 1); $c2->insert("end", "0"); $c2->insert("end", "Large"); $c2->insert("end", "LargeEnoughToNotFitInTopWidget"); $f->Frame(-width =>160)->pack; # strut for min width... $f->pack(-fill => 'x', -expand => 1); MainLoop;
Or maybe I don't understand your problem at all.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Setting the minimum size of an autosized Tk widget
by olgo (Sexton) on Dec 10, 2021 at 14:18 UTC | |
by tybalt89 (Monsignor) on Dec 10, 2021 at 19:28 UTC |