Dragging an image to a card?
doug at webcrossing.com
Sat Feb 14 01:56:26 CST 2004
On 2/14/04 3:37 PM, "Yves COPPE" <yvescoppe at skynet.be> wrote:
> Le 13 févr. 04, à 23:56, Doug Lerner a écrit :
>> I can browse for an image file and upload it and place the image in a
>> with the answer file dialog.
>> Is there some way of doing this by dragging an image file to the card
>> instead? That would be a nice option, and many applications allow you
>> to do
> It's very easy.
> Look in the archives, Klaus Major has written a sample stack that
> explains the process.
Interesting. In his script (below) do you see what restricts the images from
being dragged just to the image area, etc?
set the acceptdrop to true
## otherwise you could not drop anything... :-(
put the dragdata
### just put the path into the msg for info
switch char -4 to -1 of the dragdata
### Here is just check the suffix of the dropped files...
### Much room for enhancements... ;-)
set the filename of img 1 to the dragdata
put url("file:" & the dragdata) into fld 1
set the rtftext of fld 1 to url("file:" & the dragdata)
set the filename of player 1 to the dragdata
More information about the use-livecode