Picture in a field?

Jan Schenkel janschenkel at yahoo.com
Sun Jul 6 05:01:01 EDT 2003


--- "valetia at mac.com" <valetia at mac.com> wrote:
> Is there a way to perform a "text wrap"?
> 
> The imageSource method seems to place the picture on
> the same level as a
> single line of text.
> 
> How would you have multiple lines of text flowing
> alongside an image in the
> same field (like the way it works with HTML)?
> 
> Valetia
> 


Hi Valetia,

I don't think that's possible at the moment. However,
if you're a Windows user, you could use altBrowser :
http://www.altuit.com/webs/altuit2/RunRev/altBrowser.htm
Let's keep our fingers crossed the authors can find a
way to build Mac and Unix versions.

In the meantime, you could do something similar with
the following, time-consuming workaround :
- make the field at its full size (no scrolling) and
set its tabStops property to 10 for easier alignment
- place image controls at the correct spots, editing
the field along the way, breaking lines with return
and adding tabs to make sure the text is drawn
correctly around the images
- place a transparent graphic control at the top and
the bottom of the field ; note that these have to be
visible or things won't work
- group the images and the 2 graphic controls, and set
the margins of the group to 0
- set the script of the field to also scroll the image
group at the same time :
  on scrollbarDrag
    set the vScroll of group "images" to \
        the vScroll of me
  end scrollbarDrag
And there you have it : your images and text flowing
together neatly as you scroll.

For more fine-tuned control, you can set the tabStops
of the field to a lower number ; if you feel up to it,
you could set this to 1, and script your way through
the procedure by examing formattedWidth of chunks of
the field and formattedHeight of images, etc.

In a variation on the above, you can do the following
:
- place the images about where you'd want them to end
up (you may have to tweak later)
- place the text in multiple borderless fields to the
right and left of them, and between them, tweaking
their positions manually
- group the lot and give the group scrollbars.
There might even be ways to make editing easier, as
you can auto-flow from one field to another ; check
out this post from a while ago :
http://lists.runrev.com/pipermail/use-revolution/2002-October/009003.html

All in all, not the easiest thing to do, and your
careful placement might become a disaster on a
computer that ahs a slightly different font.

Nevertheless, I hope this helped,

Jan Schenkel.

=====
"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com



More information about the use-livecode mailing list