Changing Font Style of Text Already in a Field

Chipp Walters chipp at chipp.com
Fri Oct 28 15:48:24 EDT 2005


Both Klaus and Signe Marie Sanne have good suggestions for doing this:

set the textfont of char 1 to -1 of fld "X" to to "Lucida Grande"

Both of their solutions involve explicitly set the font of the 
characters. Another way is to do as you do:

set the textFont of fld "X" to "Lucida Grande"
put the text of fld "X" into fld "X"

This has the added advantage if you cut and paste the text from fld "X" 
to another fld, it doesn't automatically take the font settings with it.

IOW, it's still just plain text.

-Chipp


Gregory Lypny wrote:
> Hello Everyone,
> 
>     If I have a field full of text in, say, Geneva, and want it  changed 
> to Lucida Grande, how do I do it with a handler?  I've tried
>     set the textFont of fld "X" to "Lucida Grande"
> but that only changes a text property of the field itself but not the  
> appearance of text already in it.




More information about the use-livecode mailing list