View Full Version : [fmx] to limit lines input textfield
eudora
May 13th, 2003, 05:42 AM
is there a way to limit the user from entering more than lets say 4 lines in an input textfield?
Nikini
May 13th, 2003, 05:47 AM
There is an input text box on the property named maximum characters, you number the characters from a line and you multiply them with 4 and you write there.
eudora
May 13th, 2003, 06:16 AM
hmmz that is not exactly what i want..
for an input text field.. i can keep pressing enter key and it will still scroll beyond the 4 lines..
i want it to be just a 4 line box
is it maxScroll?
eudora
May 13th, 2003, 11:51 AM
anyone can help? i would still need this effect.. :(
eudora
May 13th, 2003, 10:31 PM
:hair:
lostinbeta
May 13th, 2003, 10:49 PM
I don't believe there is a way to limit the amount of lines used.
maxscroll sets the maximum amount of lines you can scroll.
maxChars sets the maximum amount of characters that can be contained in the textbox.
maxChars will not help you if the enter button is pressed as it drops a line but still doesn't register as a full line of characters, so it wont work.
maxscroll won't work because well... it has to deal with the maximum scrolling and not the maximum amount of lines you can type in.
I don't think what you want can be done, but I could be wrong.
eudora
May 14th, 2003, 04:23 AM
think i will just leave a note for visitors not to exceed the first 4 lines then.. :) thanks
martijneerens
December 14th, 2004, 06:17 AM
I'm also trying to accomplish the same thing: limit the number of lines people can enter in an input textfield. Is there no way you can combine maxChars and maxScroll? there also is "textfield.onScroller" which checks if the textfield is being scrolled. Can't i use an eventhandler based on onScroller? Like:
textfield.onScroller = function() {
tekstveld.maxChars = textfield.length;
};
paradox244
December 14th, 2004, 05:40 PM
why dont you use bottomScroll it tells you the line number for the last visible line in the textField, just a guess but that will probably do it for you both.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.