embedding images in fields : fixedlineheight must be false

Claude Lemmel opus.species at wanadoo.fr
Sat Feb 16 02:59:01 EST 2002


> At 9:46 PM -0800 2/14/2002, Claude Lemmel wrote:
> >What is the syntax to embed an image in a field by URL ?
> >
> >By name :
> >set the imagesource of char 3 of field "test" to "someimagename"
> >is OK
> >
> >By id :
> >set the imagesource of char 3 of field "test" to 1011
> >is OK
> >
> >By URL :
> >???
>
> set the imageSource of char 3 of field "Test" to
> "http://www.example.com/image.gif"
>
> --
> Jeanne A. E. DeVoto ~ jeanne at runrev.com
> http://www.runrev.com/
> Runtime Revolution Limited - Power to the Developer!

Thanks Jeanne

I did try this syntax but it did not work because the fixedlineheight of my
field was true ; in this case, if the image is to high, it do not appear at
all.

Also, for an image stored on the harddisk url "file:..." do not work, one
must write url "binfile:..."

If anyone want to test, just create a new stack with a field and a button
with this script

on mouseUp k
  if k =3 then edit the script of me
  else
  set the fixedlineheight of field 1 to false
    repeat with i = 1 to 4
      answer file "image source ?"
      if the result <> "cancel" then
        put return & return & return & return & return & return & return &
return & return & return & space after field 1
        set the imagesource of last char of field 1 to "binfile:" & it
        put the htmltext of field 1
      end if
    end repeat
  end if
end mouseUp

Claude




More information about the metacard mailing list