Wrap text around images in text fields

Ken Ray kray at sonsothunder.com
Mon Dec 12 12:18:12 EST 2005


On 12/12/05 3:36 AM, "Sivakatirswami" <katir at hindu.org> wrote:

> I want text to wrap around an image in a text field... doable or not?

Not automatically... you can set the imageSource of the first char to an
image, and even use textShift on that char to move the image up/down from
the baseline of the text. You can also create a "hanging indent" by setting
the margins of the field to something like <widthOfGraphic>,8,8,8 and then
set the firstIndent of the field to like ((-1*<widthOfGraphic>) +
<leftMarginYouWant>).

The above approach will create a field with an image in the upper-left of
the field, with text starting right after the right edge of the image, and
all text wrapping to that same point (so there's nothing below the image).

This is about the best that can be done (other than manually inserting CRs
and tabs), and doesn't wrap around the image (it kind of makes the image act
as a drop cap), since we don't have paragraph-level formatting.

This is all from my head, so you'd have to adjust things a few pixels here
and there.

HTH,


Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: kray at sonsothunder.com




More information about the use-livecode mailing list