Ken,
thank you for your effort and detailed answer.
However, it does not answer my key question, namely whether there is a possiblity for stating a minimum size of the top entry widget of a BrowseEntry (or any Tk widget really). Maybe my english is just too poor for this to be clear but given all the other answers, I expect the answer to be "no".
I've actually just realized that the same problem goes also for e.g. Buttons. Of course, as with the example of the BrowseEntry before, I can programmatically set it to be of static, wide enough, width if its label is really small, but I am looking for Tk framework attributes to do it for me.
My note about different geo managers simply intended to state that I do know that placing the BrowseEntry in a grid geo context would in fact stretch it out to fit its "column companions", but given how my GUI looks, I simply wouldn't use a grid based placing of these widgets.
Programmatically changing the width based on the actual sizes of the entries (as suggested by ++Discipulus) will suffice however, although I would have expected such a feature to reside in the Tk libraries themselves. I wouldn't mind adding it myself but the level of Perl code in the Tk modules is above my paygrade
For the sake of further argument:
Button width code example.
The example shows that the "1" button gets irritatingly small, whereas the "TooLargeToBeVisible" button label is not fully shown
(I would have liked an attribute -minWidth=>10 together with the -width=>0, making "1" and "2" width 10 and the others as wide as needed to show the entire label)
use Tk;
my $top = MainWindow->new;
my $f = $top->Frame;
$f->Button(-text => "1", -width => 0)->pack();
$f->Button(-text => "LargeButStillQuiteVisible", -width => 0)->pack();
$f->Button(-text => "2", -width => 10)->pack();
$f->Button(-text => "TooLargeToBeVisible", -width => 10)->pack();
$f->pack;
MainLoop;
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.