in reply to Tk::BrowseEntry question

This problem is caused by an unfortunate auto-delegation implementation in Tk. Tk::BrowseEntry inherits from Tk::Frame and delegates some options to the internal Tk::LabEntry subwidget. Unfortunately Tk::Frame itself uses some of the -label* options itself and auto-creates a Label. So under some circumstances (as in yours) you get an unwanted Label widget.

It seems that the correct solution would be patching Tk::BrowseEntry to pass all -label* options to the Tk::LabEntry subwidget:

--- Tixish/BrowseEntry.pm (revision 1396) +++ Tixish/BrowseEntry.pm (local) @@ -26,7 +26,17 @@ sub ListboxWidget { "Listbox" } sub Populate { my ($w, $args) = @_; + my %labelArgs; + while(my($k,$v) = each %$args) { + $labelArgs{$k} = $v; + delete $args->{$k}; + } + $w->Tk::Frame::Populate($args); + + while(my($k,$v) = each %labelArgs) { + $args->{$k} = $v; + } # entry widget and arrow button my $lpack = delete $args->{-labelPack};

Another solution would be to not use any of the -label* options when constructing the BrowseEntry, but configure the subwidget directly (the Subwidget name is "entry").

Or just use the optiondb? $mw->optionAdd("*BrowseEntry.Entry.background", $bgcolor, "startupFile"); ...