Not passing a return key or enter key.

J. Landman Gay jacque at hyperactivesw.com
Fri Aug 12 23:56:31 EDT 2005


Glen Bojsza wrote:
> 
> I wish to limit the number of lines (no more than 3) in a field that a
> user add input.

Size your field to exactly 3 lines high. Set the autotab property of the 
field to true. The field will now allow only three lines of text. Any 
returns entered after that will cause the selection to jump to the next 
editable field. No scripting required.

You can still paste more than 3 lines though. For that, trap the 
"pastekey" message and trim off all but the first three lines. Note that 
pastekey may not work in the IDE, but will work okay in a standalone or 
when you suspend development tools.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com



More information about the use-livecode mailing list