Is there a way to wrap text in a text entry field?

Devin Asay devin_asay at byu.edu
Wed Apr 24 14:09:28 EDT 2013


On Apr 24, 2013, at 11:09 AM, Shawn Blc wrote:

> Craig,
> 
> My questions are in a text input field, words are average size words.  This
> still has me confused.  I can stretch the text input field to fit the
> question, but it's a pain, because I'm also calling these questions on the
> last page (where I'm checking the answers).  It'd be helpful if the field
> would stretch to fit the question (wrap).
> 
> I have:
> 
> -- puts question 5 from the test into fieldQD5 on the page where I check
> the answers.
> 
> *put* gQ5 into field "fldQD5"

Shawn,

It sounds like what you want is to resize the field to show all of the text. Have you tried the formattedHeight property, which works in conjunction with dontWrap?

set the dontWrap of fld "myFld" to true
put whoppingHugeString into fld "myFld"
put the topLeft of fld "myFld" into tAnchorPt
set the height of fld "myFld" to the formattedHeight of fld "myFld"
set the topLeft of fld "myFld" to tAnchorPt

HTH

Devin

Devin Asay
Office of Digital Humanities
Brigham Young University





More information about the use-livecode mailing list