Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to restrict the entry widget to n characters??

Status
Not open for further replies.

RajVerma

Programmer
Jun 11, 2003
62
DE
hi,

I want to restrict the user from entering any number more than 100 in my entry widget. how to do that?? I cud able to restrict to only numbers with

-validate key -vcmd {string is int %P},

but I also want to restrict the length of the input in the entry. any help!

thanx,
Raj.
 
{if {![string is integer %P]||[%P>100]} {do your correction}

_________________
Bob Rashkin
rrashkin@csc.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top