restrict number of characters in a field?
Frank D. Engel, Jr.
fde101 at fjrhome.net
Wed Jul 26 19:26:48 CDT 2006
Note that this code will not prevent pasting or drag-and-dropping of
larger blocks of text into the field. It only works for text newly
typed from the keyboard.
On Jul 26, 2006, at 12:14 AM, Kay C Lan wrote:
> On 7/26/06, Peter T. Evensen <pevensen at siboneylg.com> wrote:
>> on keyDown pKey
>> if the length of the text of me < 5 then
>> pass keyDown
>> end if
>> end keyDown
> (note, this hasn't been tested, but just written off the top of my
> Tested and it works fine.
> Here is a slight amendment to cater for large doses of text and touch
> typists who don't usually look at the screen and may wonder where
> the last
> dozen characters went.
> on keyDown pKey
> if (the length of the text of me > 254) then
> pass keyDown
> end if
> end keyDown
> This allows 255 (yes that is correct) characters in a field before
> it will
> start beeping at you. This has been tested and comes with a 12" or
> guarantee, which ever comes first:-)
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
$0 Web Hosting with up to 200MB web space, 1000 MB Transfer
10 Personalized POP and Web E-mail Accounts, and much more.
Signup at www.doteasy.com
More information about the use-livecode