Adding images to Fields ?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Adding images to Fields ?
I am preparing a help/info stack for an ecosystem analysis program.
There are quite a few equations and other small graphics I would like to add to scrolling fields that contains various font sizes, colors etc..(formatted text).
How do you add graphics in a scrolling field. Is this possible, easy. Or should I go a different way ?
Cheers,
Michel
There are quite a few equations and other small graphics I would like to add to scrolling fields that contains various font sizes, colors etc..(formatted text).
How do you add graphics in a scrolling field. Is this possible, easy. Or should I go a different way ?
Cheers,
Michel
Re: Adding images to Fields ?
Hi there,
“imageSource” may suit your needs. This lets you assign an image to a character in a field (including scrolling fields). The Rev dictionary gives some examples:
Edit: another text property worth mentioning is "textShift", which may help adjust the alignment of images with surrounding text. Again, from the Rev dictionary:
Michael
“imageSource” may suit your needs. This lets you assign an image to a character in a field (including scrolling fields). The Rev dictionary gives some examples:
To automatically allow line space to display an image (which could be considerably bigger than the surrounding text) set the fixedLineHeight of the field to false. You mention your fields contain text of various sizes, so it sounds like the fixedLineHeight of the fields you are using is already set to false, but I thought it a useful thing to mention. I hope this helps.set the imageSource of char 1 of line 2 of field "This" to 2533
set the imageSource of char thisChar of field 1 to "Arrow"
set the imageSource of last char of me to "binfile:My Image"
Edit: another text property worth mentioning is "textShift", which may help adjust the alignment of images with surrounding text. Again, from the Rev dictionary:
Regards,set the textShift of last char of word 2 of field 1 to 3 -- subscript
set the textShift of char 12 of the selectedField to -1 -- superscript
Michael
-
- Posts: 344
- Joined: Tue Feb 24, 2009 6:14 pm
- Contact:
Re: Adding images to Fields ?
If I have a variable that was filled with a line like this:
I can do this:
But these do not work:
Is there a way to set a character's imageSource with data like this?
Code: Select all
put url aTempImageURL into myImg
Code: Select all
set the text of img 1 to myImg
Code: Select all
set the imageSource of char 1 of fld 1 to myImg
set the imageSource of char 1 of fld 1 to the imagedata of img 1
set the imageSource of char 1 of fld 1 to img 1
~ Nonsanity
~ Chris Innanen
~ Chris Innanen
Re: Adding images to Fields ?
Hi Nonsanity,
dont work
butwork
Best
Jean-Marc
Code: Select all
set the imageSource of char 1 of fld 1 to the imagedata of img 1
but
Code: Select all
set the imageSource of char 1 of fld 1 to the short id of img 1
Best
Jean-Marc
https://alternatic.ch
Re: Adding images to Fields ?
Thanks, Jean-Marc.
I thought about that possibility once, but then thought that it would be silly. Makes sense now though. I should have at least tried it.
I thought about that possibility once, but then thought that it would be silly. Makes sense now though. I should have at least tried it.
~ Nonsanity
~ Chris Innanen
~ Chris Innanen