Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Perl/Tk,How to limit the number of characters in Entry?

by perllee (Novice)
on Jan 19, 2013 at 05:29 UTC ( [id://1014170]=perlquestion: print w/replies, xml ) Need Help??

perllee has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

Perl/Tk,How to limit the number of characters in Entry?For example, enter the product serial number.

Can you give an example? Thanks.

  • Comment on Perl/Tk,How to limit the number of characters in Entry?

Replies are listed 'Best First'.
Re: Perl/Tk,How to limit the number of characters in Entry?
by BrowserUk (Patriarch) on Jan 19, 2013 at 05:46 UTC

    See -validate => 'key', -ValidateCommand => sub { length( $_[0] ) <= 10 ? 1 : 0 } and the validation section of the Entry widget POD.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
      Thanks!!
Re: Perl/Tk,How to limit the number of characters in Entry?
by Anonymous Monk on Jan 19, 2013 at 07:40 UTC
      Thank you very much for your enthusiastic reply, the answer I need.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (7)
As of 2024-04-24 09:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found