Drop on a field cast member then use the dialog box to specify which key strokes are allowed within that field.
property whichKeys
on keyDown me
init me
end
on init me
put the key into k
if the whichKeys of me contains k then
pass
else
if k = BACKSPACE then
pass
else
if k = "." then
pass
else
dontPassEvent
end if
end if
end if
end
---
on getPropertyDescriptionList
set p_list = [ #whichKeys: [ #comment: "Allowed Keys:", #format: #string, #default: "1 " ] ]
return p_list
end
on getBehaviourDescription
return "Lets you to specify which keystrokes are allowed within a specific field"
end
Contact
MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA