japskar
Programmer
- Feb 13, 2002
- 27
A couple of days ago I found an very helpful topic regarding control of entry-datatypes.
I've been playing around with the possibillities, and encountered the following problem with, for example, realnumbers:
1. when I set the -validate option to "key", I can't enter something like "2e3" as real number (well, I can by first entering 23, and inserting an e in between). So that's not what I want.
2. when I set the -validate option to "focus", I'd like to receive an errormessage in case of wrong input; but how can I trap that event in this case?
e.g:
pack [entry .e -validate focus -vcmd {string is double %P}]
Best regards,
Jasper van Dijk
I've been playing around with the possibillities, and encountered the following problem with, for example, realnumbers:
1. when I set the -validate option to "key", I can't enter something like "2e3" as real number (well, I can by first entering 23, and inserting an e in between). So that's not what I want.
2. when I set the -validate option to "focus", I'd like to receive an errormessage in case of wrong input; but how can I trap that event in this case?
e.g:
pack [entry .e -validate focus -vcmd {string is double %P}]
Best regards,
Jasper van Dijk