http://purl.org/tcl/home/man/tcl8.4/TkCmd/entry.htm An entry box is designed to allow the user to enter one line of text for use by the application. ---- Hopefully, people will add new pages demonstrating various techniques for doing entry box validation of some common formats, like phone numbers, etc. ---- See also: * [An entry with a history] * [Echo-free password entry] * [entryfield] * [Entry Field Processing] * [Entry Validation] * [Entry box validation for IP address] * [Integer entry validation with range check] * [Right-to-left entry widget] * [Time entry that never contains invalid data] * [Validating Credit Card Check Digits] * [Wcb] * [widget:entry] ---- '''Programmable scientific calculator in two lines:''' (why, it can do ''asin'' and ''log'' ;-) pack [entry .e -textvar e -width 50] bind .e {catch {expr [string map {/ *1.0/} $e]} res; append e " = $res"} ;# RS The [string map] forces floating-point calculation, so people won't be disappointed that 1/2 returns 0 ... See [A little calculator] for discussion. And, as [CL] noted, this thingy is programmable: enter for example [proc fac x {expr {$x<2? 1: $x*[fac [incr x -1]]}}] into the entry, disregard warnings; now you can do [fac 10] and receive ''[[fac 10]] = 3628800.0'' as result... ---- One common question is about "[Echo-free password entry]". Entry has an easy answer: its -show option is useful in precisely this situation. ---- [Category Widget] - [Category Command] - [Tk syntax help] - [Arts and Crafts of Tcl-Tk Programming]