Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Setting the minimum size of an autosized Tk widget

by Discipulus (Canon)
on Dec 09, 2021 at 11:41 UTC ( [id://11139499]=note: print w/replies, xml ) Need Help??


in reply to Setting the minimum size of an autosized Tk widget

Hello olgo,

If I have understood your question, you can set the width dinamically based on the lenght of entries

my $atleast = 10; # default width my $c2 = $f->BrowseEntry(-label => "Misc2:", -width => $atleast ); $c2->pack; foreach my $entry ( qw(0 Large LargeEnoughToNotFitInTopWidget) ){ $c2->insert("end", $entry); $atleast = length $entry if length $entry > $atleast; } $c2->configure( -width => $atleast );

L*

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11139499]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (5)
As of 2024-04-24 18:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found