home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Practical Programming in Tcl & Tk (4th Edition)
/
TCLBOOK4.BIN
/
pc
/
exsource.old
/
32_2.tcl
< prev
next >
Wrap
Text File
|
2003-04-15
|
218b
|
15 lines
#
# Example 32-2
# Restricting entry text to integer values.
#
proc ValidInt {val} {
return [ expr {[string is integer $val]
|| [string match {[-+]} $val]} ]
}
entry .e -validate all -vcmd {ValidInt %P}
pack .e