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 <[email protected]> To: How to use LiveCode <[email protected]> Sent: Wed, Mar 7, 2012 5:03 pm Subject: Re: Allowing user to change size and location of a field Glen Bojsza<[email protected]> 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 | [email protected] HyperActive Software | http://www.hyperactivesw.com _______________________________________________ use-livecode mailing list [email protected] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode _______________________________________________ use-livecode mailing list [email protected] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
