Hello, monks!
Two pieces of code.
Based on Tk::Text widget:
$match_box_wdg = $re_edit_frame_wdg->SearchEntry(
-width => 70,
-height => 1,
-font => "$text_font $text_size",
-bg => "#ffffff",
)->grid(
-sticky => 'w',
-row => 1,
-column => 0,
-padx => 5,
-pady => 1,
);
And the same but scrolled:
$match_box_wdg = $re_edit_frame_wdg->Scrolled(
'SearchEntry', #custom widget
-scrollbars => '',
-width => 70,
-height => 1,
-font => "$text_font $text_size",
-bg => "#ffffff",
)->grid(
-sticky => 'w',
-row => 1,
-column => 0,
-padx => 5,
-pady => 1,
)->Subwidget('scrolled');
Both are fine. Look and behave quite the same, except.. Except for one thing that drives me crazy. If somewhere I do
$match_box_wdg->configure('height => 10'); it works properly for the first case, but doesn't change the appearence for the second one!
Though it changes value of -height actually.
print $match_box_wdg->cget('height') shows 10. Both for Scrolled and Subwidget. But still the appearence isn't changed. It still looks like -height == 1.
As for other options, -state works properly in both cases. But -bg or -width behave the same wierd way as -height.
I have ActivePerl 5.8.7.815 on my WinXP SP4 box.
UPDATED:
You may get the whole project from SourceForge:
cvs -z3 -d:pserver:anonymous@refine.cvs.sourceforge.net:/cvsroot/refine co -P refine
The disputable code is located in refine.pl and marked with XXX.
Thanks in advance,
Artem.
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.