Page 1 of 1

locate image and text in field

Posted: Thu Feb 20, 2014 2:40 pm
by Jellobus
Hi, :D

Is there way to locate image file after text in the field, then put text after image?

- There are 2 text paragraphs in a field and 1 image object.
- length of text will be changed. it depends on the data, so it could be long or short.
- image will be placed after the first paragraph so topleft or loc of image will be always changed depends on the length of the first paragraph.
- another text will be put after the image.
- Its like Text---space---Image---space---Text in fld.

I was brainstorming for few days but couldn't have idea.. Any good ideas?
Thanks for your time!

Cheers,

Louis

ps: Can I make a field automatically expand its size to show whole content of itself? then I can create two fields for text and put image between them..

Re: locate image and text in field

Posted: Thu Feb 20, 2014 2:56 pm
by Klaus
Hi Louis,

not sure what you want? 8)

1. Do you want to place an image object over a field and make it looks like the image is part of the text (field)?
2. Or do you really want to put an image INTO a field and let it "flow" with the text?

If:
1. then you can get and use the exact location of the "chunk" like:
...
put the formattedright of word 1 of fld "the text field here..."into tRight
set the left of img "the imge in text" to tRight
### etc...
### Look up FORMATTEDxyz in the dictionary
...

If:
2. Then you can use "imagesource" to "replace" any cahracter in y field with an image
...
set the imagesource of char 17 of fld "a text field" to XXXX
## where XXXX is the id of any image in your stack(s)
...

Hope that helps!


Best

Klaus

Re: locate image and text in field

Posted: Thu Feb 20, 2014 3:03 pm
by Jellobus
Hi Klaus,
Wow! sloved!
I was talking about the first option. but another way is also seems good option for me :lol:

Thank you so much!

Louis