Text field wrapping

Mark Mitchell mark_mitchell at kmug.org
Sun Feb 3 08:56:01 EST 2002

>>brent neal writes:
>I think those are pretty compelling reasons to fix this behavior. I 
>was pretty disappointed when I ran up against this limitation. I'm 
>fairly sure it wasn't a problem in HyperCard, since the text fields 
in HC used the Toolbox TE, but its been 8 years since I've done any 
HC development.

Brent, if it is really a 'limitation' for you, you can get the behaviour you want by
putting the following in the card script

on keydown
  put the width of field myField into myWidth
  put the formattedwidth of field myField into newWidth
  if newWidth > myWidth then
    put the number of characters of myField into charNum
    put return before character charNum of field 1
    select after field 1
  end if
pass keyDown
end keydown

if you have more than one field you will have to modify accordingly

mark mitchell

More information about the Use-livecode mailing list