html formatting in a field

Richard Gaskin ambassador at fourthworld.com
Thu May 27 11:48:52 EDT 2004


Springer, Paul wrote:
 > I am struggling with HTML formatting of text in a field. I don't
 > want to copy or import it, as described by the HTMLText field
 > property documentation; I just want to put some HTML tags into
 > the contents of a field and have the text displayed accordingly.
 > I see that I can set the HTMLText property of a field to some
 > html string, but I want to format different text portions
 > differently, not the entire field with one tag string.
 > Can I do that?

Yep --  you can set the htmlText property of chunks as well as the 
entire field:

    set the htmlText of char 10 to 20 of fld 1 to "<b>Hi!</b>"

Or you can use simply:

   set the textStyle of char 10 to 20 to bold

-- 
  Richard Gaskin
  Fourth World Media Corporation
  ___________________________________________________
  Rev tools and more:  http://www.fourthworld.com/rev



More information about the use-livecode mailing list