Allowing user to change size and location of a field

dunbarx at aol.com dunbarx at aol.com
Wed Mar 7 17:39:18 EST 2012


What Jacque is saying is to load the formatted height, maybe into a custom property, right after you resize. Then, as the user types, check the current formattedheight, at each keystroke, and if it exceeds the initial value, disallow that text entry.


I played around with this too, etting a custom property to the formattedHeight upon resizing, but ran up against a wall if the field is made smaller. Then the text already is too full for it.


Jacque will find a way, though.


Craig Newman



-----Original Message-----
From: J. Landman Gay <jacque at hyperactivesw.com>
To: How to use LiveCode <use-livecode at lists.runrev.com>
Sent: Wed, Mar 7, 2012 5:03 pm
Subject: Re: Allowing user to change size and location of a field


Glen Bojsza<gbojsza at gmail.com> wrote:

> Another question which may not be able to be answered is... can you limit
> the number of characters in the field based on the new size the user has
> made?

What I usually do is trap keydown and check the formattedheight while 
the user is typing. If the text is too long then either truncate it or 
warn the user some other way. If the field has just been resized, then 
check the formattedheight after the resizing and take action if the 
contents are too long.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

 



More information about the use-livecode mailing list