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

Re: Tk Entry validation conundrum (numentry/spinbox)

by Anonymous Monk
on Dec 18, 2015 at 09:06 UTC ( [id://1150680]=note: print w/replies, xml ) Need Help??


in reply to Tk Entry validation conundrum

Use a Tk::Spinbox, see https://metacpan.org/source/SREZIC/Tk-804.033/examples/spinbox

See Re: can'yt figure out whats wrong in this code?, Re: Perl/Tk,How to limit the number of characters in Entry? and widget - Demonstration of Perl/Tk widgets, Entries and Spin-boxes: 3. Validated entries and password fields.

#!/usr/bin/perl -- use strict; use warnings; use Tk; my $mw = tkinit; for my $ix ( 0 .. 9 ){ my $box = $mw->Spinbox(qw/ -from -10 -to 10 -increment .01 -format %05.2f -width 10 /, )->pack ; $box->set( $ix ); } $mw->WidgetDump; MainLoop;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2024-04-26 00:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found