Hello Monks.
I have a script, which uses a Tk::BrowseEntry widget to select an option from a list which not only has default values, but can also be appended. The widget is usually set to ‘read only’ but a new entry can be added by clicking a button which runs the following sub:
sub add_button_click{$entryvariable = "";
$mybrowseentry->focus;
$mybrowseentry->configure(-state => 'normal'); }
The user can then input whatever they want, but when they have finished (or click off the entry box) I need to be able to change the state back to be read only.
any ideas???
To make my life easier, I could really do with knowing how to check the status of any of the variables,widgets etc. at ANY point in time, and not just when a button or something is pressed - is this possible with TK???
Many thanks
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.