Is it possible to limit text input in a field based upon its height?

Shao Sean shaosean at hotmail.com
Sat Sep 16 21:09:27 EDT 2006


Yes, just check the formattedHeight property on a keyDown

on keyDown pKey
  --- check the height of the text in the field and allows you to enter text 
if it's less that the height of the field
  if (the formattedHeight of field "fieldToCheck" < the height of field 
"fieldToCheck") then
    pass keyDown     -- allow for the character to be displayed
  end if
end keyDown

That was just off the top of my head with no testing as I'm just heading off 
to bed.

_________________________________________________________________
Search from any web page with powerful protection. Get the FREE Windows Live 
Toolbar Today!   http://get.live.com/toolbar/overview




More information about the use-livecode mailing list