moving text with formats

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
adventuresofgreg
Posts: 349
Joined: Tue Oct 28, 2008 1:23 am
Contact:

moving text with formats

Post by adventuresofgreg » Sat Apr 30, 2011 3:30 pm

Hi: This might be a simple question, but I can't seem to find an easy answer in the userguide. I would like to move some formatted text (type sizes, typestyles, etc) from a field into another field, but the styles and formatting information is not moving with the text. Is there an easy way of maintaining the styles, etc?

thanks
Greg

Klaus
Posts: 14212
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: moving text with formats

Post by Klaus » Sat Apr 30, 2011 3:51 pm

Hi Greg,

yep, use "the htmltext of fld..." (or maybe "the RTFTEXT of fld ...")
...
set the htmltext of fld "boring" to the htmltext of fld "field with nice formatted text and stuff"
...
Et voila, styled text :D


Best

Klaus

adventuresofgreg
Posts: 349
Joined: Tue Oct 28, 2008 1:23 am
Contact:

Re: moving text with formats

Post by adventuresofgreg » Sat Apr 30, 2011 4:15 pm

YA! perfect. thats worked. Now, is it possible to include images in the text field?? I woudl like to be able to paste in small graphics into the field and have those scroll with the text.

Regulae
Posts: 136
Joined: Tue Oct 20, 2009 6:05 am

Re: moving text with formats

Post by Regulae » Sun May 01, 2011 6:05 am

Hi there,

I remember contributing to a thread which looked at including images in text fields:
http://forums.runrev.com/phpBB2/viewtop ... f=9&t=5780
... which may be of interest.

Regards,
Michael

Klaus
Posts: 14212
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: moving text with formats

Post by Klaus » Sun May 01, 2011 10:59 am

Hi Greg,

yep, check the above link, "imagesource" is the magic word :D


Best

Klaus

Post Reply