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

2007-07-20 Thread haribo
dont click the enterkey it dont work. ralle -- View this message in context: http://www.nabble.com/Is-it-possible-to-limit-text-input-in-a-field-based-upon-its-height--tf2283530.html#a11531258 Sent from the Revolution - User mailing list archive at Nabble.com

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

2007-07-20 Thread Ken Ray
On Tue, 10 Jul 2007 15:55:00 -0700 (PDT), haribo wrote: works fine, but is there any way to set it to the spacebar, if the user dont click the enterkey it dont work. You can't set the autotab to a spacebar, but you could simulate it with code in the field: on keyDown pKey if pKey is

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

2007-07-20 Thread Klaus Major
Hi Ralle, On Tue, 10 Jul 2007 15:55:00 -0700 (PDT), haribo wrote: works fine, but is there any way to set it to the spacebar, if the user dont click the enterkey it dont work. You can't set the autotab to a spacebar, but you could simulate it with code in the field: on keyDown pKey

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

2007-07-20 Thread Robert Presender
Hi, If the field height is divided by the textHeight, the result is the number of lines. You can then limit the number of lines. See textHeight and keyDown in the docs. Don't know if the spacebar can be used with keyDown. Regards ... Bob on Tue, 10 Jul 2007 15:55:00 -0700 (PDT) haribo

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

2007-07-20 Thread Scott Morrow
Hello. I once used something similar to what Bob suggested. (Though I should look at Bob's line solution to see if it won't work better.) The following doesn't work perfectly in all cases... but perhaps it will provide an idea. -- this goes in the field on rawKeyUp FieldLimiter

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

2006-09-21 Thread William de Smet
Hi there, I just tested the suggested code and it works. What if I want to limit text input based upon its height and width? I just thought to replace the word 'height' with 'width' and put in extra code but that doesn't work: if (the formattedHeight of field tekst the height of field tekst)

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

2006-09-18 Thread William de Smet
Hi there, Thanks for your replies. The suggestion Sarah gave works fine with text entries. I also use pasted text and Kay C Lan's code might work but I didn't test it yet. William de Smet 2006/9/18, Kay C Lan [EMAIL PROTECTED]: Good responses for data as you type, but something else would

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

2006-09-18 Thread Chipp Walters
I hate using monospace fonts...they're so...ugly...and non-standard. I would suggest looking at Sean's approach on paste. ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your

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

2006-09-17 Thread Kay C Lan
Good responses for data as you type, but something else would be needed for pasted data. In such a case I generally force the use of monospace fonts, I can then quickly determine exactly how many characters can fit into the field: if (the number of chars of the clipboardData[Text] 543) then

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

2006-09-16 Thread William de Smet
Hi there, I made a field which is 500(width) x 530(height) pixels and now I am looking for a way to limit the text input in this field based upon the height of the field. I dont want more text than the height of the field. Is this possible? greetings, William de Smet

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

2006-09-16 Thread Sarah Reichelt
On 9/17/06, William de Smet [EMAIL PROTECTED] wrote: Hi there, I made a field which is 500(width) x 530(height) pixels and now I am looking for a way to limit the text input in this field based upon the height of the field. I dont want more text than the height of the field. If you set the

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

2006-09-16 Thread Shao Sean
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