Drag Act
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Livecode Opensource Backer
- Posts: 9446
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Drag Act
So . . . getting "all excited" (well, not that much as, as usual, the hype and the tripe don't coincide) about
Apple's new and much talked-up Freeform app for MacOS (that means, on your computer screen rather than
a tablet):
https://www.macrumors.com/2022/10/25/io ... eform-app/
I noticed how one can:
1. Drag an image from outwith Freeform onto its window.
2. Drag an RTF document from outwith Freeform onto its window.
The question . . .
- -
Err, No, not that question, although I am feeling fairly camp today.
The question is, is there a way to drag images and text documents from a folder window onto a LiveCode stack?
Apple's new and much talked-up Freeform app for MacOS (that means, on your computer screen rather than
a tablet):
https://www.macrumors.com/2022/10/25/io ... eform-app/
I noticed how one can:
1. Drag an image from outwith Freeform onto its window.
2. Drag an RTF document from outwith Freeform onto its window.
The question . . .
- -
Err, No, not that question, although I am feeling fairly camp today.
The question is, is there a way to drag images and text documents from a folder window onto a LiveCode stack?
Re: Drag Act
Hi Richmond,
here a quick and dirty demo stack, check the card script.
This should get you started.
Best
Klaus
here a quick and dirty demo stack, check the card script.
This should get you started.
Best
Klaus
- Attachments
-
- ru_paul.livecode.zip
- (1.1 KiB) Downloaded 71 times
-
- Livecode Opensource Backer
- Posts: 9446
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
-
- Livecode Opensource Backer
- Posts: 9446
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Drag Act
The RTF drag needs a spot of fine tuning:
- -
This is because the default textSize of a new field is 12.
- -
This is because the default textSize of a new field is 12.
-
- Livecode Opensource Backer
- Posts: 9446
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Drag Act
Code: Select all
case tSuffix = "rtf"
create field
set the rtftext of last fld to url("file:" & tFile)
---- Richmond 29/10/22
focus on last fld
select text of last fld
put the textSize of the selectedText into TXSZ
set the textSize of last fld to TXSZ
set the height of last fld to the formattedHeight of last fld
set the width of last fld to the formattedWidth of last fld
focus on nothing
----
break
-
- Attachments
-
- ru_paul_ #2.livecode.zip
- Stack.
- (1.24 KiB) Downloaded 63 times
-
- Livecode Opensource Backer
- Posts: 9446
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Drag Act
Err . . . perhaps the state of the Dictionary might be something to do with that:
- -
A great source of comfort:
-
- -
A great source of comfort:
-
-
- Livecode Opensource Backer
- Posts: 9446
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
-
- Livecode Opensource Backer
- Posts: 9446
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Drag Act
Aaaaaah:
-
-
Code: Select all
case tSuffix = "rtf"
create field
set the rtftext of last fld to url("file:" & tFile)
---- Richmond 29/10/22
focus on last fld
select text of last fld
put the textSize of the selectedText into TXSZ
set the textSize of last fld to TXSZ
set the height of last fld to the formattedHeight of last fld
set the width of last fld to the formattedWidth of last fld
select empty
----
break
- Attachments
-
- ru_paul_ #3.livecode.zip
- Stack.
- (1.24 KiB) Downloaded 68 times