Hi Manisha,

Just do a little behavior to filter the inputs onthe field, something
like:

property gpdlMaxCharCnt
property pMember

on beginSPrite me
  pMember = sprite(me.spriteNum).member
end -- beginPSrite

on keyDown me
  if (pMember.text.char.count < gpdlMaxCharCnt) then
    pass
  end if
  stopEvent
end -- end keyDown handler

on getPropertyDescriptionList me
  propL = [:]

  proL[#gpdlMaxCharCnt] = [\
#comment : "max nb of chars",\
#format  : #integer,\
#default : 20,\
#range   : [#min : 1, #max : 256]\
]

  return propL
end

Note that this keyDown script is very simple... you should ask a test to
pass also the arrows keys, DELETE and BACKSPACE even if the number of
max chars is already reached

HTH,
Séb

> can anyone tell me the script to limit the no of characters in a field
>
> thanx
> manisha
>
>
> Get 250 color business cards for FREE!
> http://businesscards.lycos.com/vp/fastpath/
>
> [To remove yourself from this list, or to change to digest mode, go to
> http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
> email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
> Lingo-L is for learning and helping with programming Lingo.  Thanks!]
>
>


[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to