The only way I'm able to cut/paste text from a field into
another application like NotePad is if the field is NOT locked.
Cut/Paste works fine with locked fields from within the development
environment but it does not work when running from a built Windows
distribution unless the field is unlocked.
Any suggestions?
If I need to provide cut&paste from a "locked"
field, I actually make it an unlocked field but handle all keystrokes
such that they don't change the content of the field. This way
the field is "open for copying from", but unavailable for
updates. the following are the handlers from such a field:
on commandKeyDown cmdChar
switch cmdChar
case "c"
copy
break
case "v"
# ignore
break
case "x"
# ignore
break
end switch
end commandKeyDown
on copyKey
copy
end copyKey
on cutKey
# ignore
end cutKey
on pasteKey
# ignore
end pasteKey
on closeField
# ignore
end closeField
on enterInField
# ignore
end enterInField
on returnInField
# ignore
end returnInField
on keyDown keyChar
# ignore
end keyDown
on backspaceKey
# ignore
end backspaceKey
on deleteKey
# ignore
end deleteKey
on escapeKey
# ignore
end escapeKey
on functionKey fNo
# ignore
end functionKey
on optionKeyDown altChar
# ignore
end optionKeyDown
If you need to enable/disable updating of the field, then use a
global such as gCanEdit, such as:
global gCanEdit
on deleteKey
if gCanEdit then pass deleteKey
end deleteKey
With the above you can enable/disable full editing or simple
"copy from" only.
Cheers
Peter
--
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk
