Re: Extended EntryWidget needed

Juergen Schoenwaelder (schoenw@cs.utwente.nl)
Wed, 4 Dec 1996 17:14:15 +0100

Thorsten.Geelhaar@materna.de said:

Thorsten> I need an entry widget which can be restricted on how
Thorsten> long a input can be. And if the input is a numeric or
Thorsten> a string.

Thorsten> For example :
Thorsten> my_entry .entry -length 5 -type numeric ....

Thorsten> This means you can only type a number in which has the
Thorsten> lenght of 5

Thorsten> I would be nice if somebody could send me a solution
Thorsten> or can give a tip how i can build something like this
Thorsten> by myself.

This is a Tk question and you should look for an answer in the Tk FAQ
or in comp.lang.tcl. (I know that this question has been discussed in
comp.lang.tcl several times and it really should be in the FAQ.)
Anyway, you can hack your own solution in Tcl by changing the bindings
for your entry. I guess this is not trivial if you want to keep all
the default bindings.
Juergen

-- 
Juergen Schoenwaelder schoenw@cs.utwente.nl http://www.cs.utwente.nl/~schoenw
Computer Science Department, University of Twente,   (Fax: +31-53-489-3247)
P.O. Box 217, NL-7500 AE Enschede, The Netherlands.  (Tel. +31-53-489-3678)