#!/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;