Numeric Only Editbox
Posted by snang
Tuesday, May 30, 2006
Description: Used for dialog editboxes
You can use this code to restrict access in a dialog editbox to numeric only. I suppose you could alter it to prevent entry of numbers?
But here you go.
Obviously you'll need to adjust the dialog name and ID.
You can use this code to restrict access in a dialog editbox to numeric only. I suppose you could alter it to prevent entry of numbers?
But here you go.
Obviously you'll need to adjust the dialog name and ID.
on *:DIALOG:<dname>:edit:<id>: {
if ($right($did($dname,$did).text,1) !isnum) {
did -o <dname> <id> 1 $left($did($dname,$did).text,$calc($len($did($dname,$did).text) - 1))
did -a <dname> <id> $null
}
}