Center text within a field?
Trevor DeVore
lists at mangomultimedia.com
Wed Jun 6 19:17:33 EDT 2007
On Jun 6, 2007, at 4:01 PM, J. Landman Gay wrote:
> Version 2:
>
> on mouseUp
> set the width of fld 1 to the width of grc 1
> get the textsize of fld 1
> if it < 20 then add 5 to it
> set the textheight of fld 1 to it
> set the height of fld 1 to it
> set the loc of fld 1 to the loc of grc 1
> end mouseUp
>
> For this one, set the fixedLineHeight of the field to true, and the
> margins to 0. (It also depends on the font and size of the field
> rather than individual textchunks.)
>
> It seems to work with the webdings example and a few others I tried
> up to a textsize around 100. More than that and it starts to drift
> downward, depending on the font. If the above isn't suitable I
> guess your image solution is the way to go.
This one works for webdings for me as well. I tried it with Arial (on
Mac), textsize set to 48 and the "1" drifted towards the top of the
circle. Does Arial work on your machine?
--
Trevor DeVore
Blue Mango Learning Systems
www.bluemangolearning.com - www.screensteps.com
trevor at bluemangolearning.com
More information about the use-livecode
mailing list