Is there an easy way to use a BrowseEntry widget without the first item/current selection being displayed? I just want the arrow button to be visible until it's clicked. I tried
-width => 1, but it doesn't work. The text field is small but it still shows up.
I also tried to hack the .pm but it's not working (not correctly, anyway).
I modified it so that the $e LabEntry widget is not
packed (commented out line 77:
$e->pack(-side => 'right', -fill => 'x', -expand => 1);). This works, but it causes the listbox to show up at the edge of the screen instead of below the button. This must be because the position is determined based on the position of the $e widget:
my $y1 = ($w->{_BE_Style} eq 'MSWin32'
? $a->rooty + $a->height
: $e->rooty + $e->height + 3
# : $b->rooty + $e->height + 3 #edited
);
my $bd = $c->cget(-bd) + $c->cget(-highlightthickness);
# using the real listbox reqheight rather than the
# container frame one, which does not change after resizing the
# listbox
my $ht = $s->Subwidget("scrolled")->reqheight + 2 * $bd;
my $x1 = ($w->{_BE_Style} eq 'MSWin32'
? $e->Subwidget("entry")->rootx
# ? $b->rootx #edited
: $e->rootx
# : $b->rootx #edited
);
Fixing this so that $x1 and $y1 are set based on the position of the button is beyond my reach.
Is there a simpler solution? Is there a different drop-down list widget that is displayed as only a button?
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.