Picture in a field?

Jan Schenkel janschenkel at yahoo.com
Sun Jul 6 07:43:00 EDT 2003


--- François Cuneo <francois.cuneo at cuk.ch> wrote:
> >> --- Fran?ois Cuneo <francois.cuneo at cuk.ch> wrote:
> >>> 
> >>> Hello everybody!
> >>> I know, I'm very dummy!
> >>> But is it an object in Revolution where is it
> >>> possible to paste text and
> >>> pictures?
> >>> I want to paste a text and some illustrations in
> the
> >>> text, all in a field
> >>> (or other object).
> >>> What may I do?
> >>> Thank you
> >>> Fran?ois
> >>> -------------- 
> >>> Fran?ois Cuneo
> >>> 
> >> 
> >> Bonjour Fran?ois,
> >> 
> >> First of all, don't orry about asking quesions.
> It's
> >> better to ask them and get answers than sit back
> and
> >> do nothing, or worse, claiming it can't be done.
> >> 
> >> That being said, you can indeed insert images
> into
> >> fields, but copy+paste is a different ballpark
> (though
> >> not impossible).
> >> 
> >> To insert an image into a field, you have to set
> the
> >> 'imageSource' of a chunk in that field ; however,
> the
> >> image will replace that chunk on display.
> >> Example :
> >> set the imageSource of char 1 of line 3 of \
> >>     field "foo" to 210095
> >> will replace char 1 of line 3 with the small
> >> RuntimeRevolution logo.
> >> 
> >> You can set the imageSource to the name of an
> image
> >> you imported earlier, or even a URL ; check the
> >> Transcript Dictionary for more info.
> >> 
> >> As for copy+pasting the text with images into a
> >> Revolution field : you may have some luck with
> the
> >> 'clipboardData' property, but I think you'd have
> >> better luck with some form of import.
> >> 
> >> Hope this helped,
> Jan, in fact, I don't know what the user of my
> application will paste in the
> field.
> Maybe text, maybe text and picture, maybe picture
> only.
> So, is it possible to prepare that?
> Thank you.
> François
> -------------- 
> François Cuneo
> 

Unless you do something special in the 'on pasteKey'
handler in your field, only the (styled) text will be
copied through, and the images would not make it to
the other side.
That's why I think an import routine is probably the
way to go if you want to fill fields with imges from
an external source.

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