[9.8] Can I resize a text field using Lingo?

Text fields cannot be resized by the usual means. However, it is possible to resize a text field in lingo on the Macintosh only, by using the rect of cast property:

set the rect of cast "myTextField" = rect(leff, topp, rite, bot)

The effect of this will depend on the style of the field being resized, as follows:

Field StyleWidthHeight
Adjust to fitrite - leffwhatever's needed to accommodate text
Scrollingrite - leffbot - topp, but no less than 31 (minimum scrollbar height)
Fixedrite - leffbot - topp
Limit to field sizerite - leffbot - topp

Only the width and height of the rect are significant, not the offsets to left and top, ie:

rect(0, 0, 100, 100)
rect(100, 100, 200, 200)

will both give the same results.

[Note that the Lingo Dictionary insists that the rect of cast cannot be set, and for DfW this is correct. Given the slightly odd way this works, it seems to be an oversight rather than a real feature, so the caveats in section 1.8 should probably be borne in mind...]