[Gambas-user] Could Control.Drag() support multiple mime type formats?

Bruce Steers bsteers4 at gmail.com
Mon Dec 20 01:13:44 CET 2021


Some of my progs have Drag enabled.

I can get a drop event and read Drag.Formats As String[] that lists all the
mime type formats for a drag event.
But i cannot set it in a Drag() operation.

I tried Control.Drag(sFilename ,
"application/x-panel-icon-internal;text/uri-list")
but then the formats i sent are
application/x-panel-icon-internal;text/uri-list
text/plain;charset=utf-8
text/plain

I find if i use Control.Drag(sFilename , "text/uri-list")
then the drag/drop event triggers okay in another app but the Drag.Data
field is empty, i have to use Drag.Paste("text/plain")
i have to do this if i drag n drop onto another application. dropping
within the same application the Drag.Data field is not null.
(is that a bug?)

But is there a way to set multiple formats in the Control.Drag() method or
is it not implemented?

I also have this problem...
if i drag this launcher icon onto my application...
/home/bonus/.config/mate/panel2.d/default/launchers/firefox.desktop

with GTK3 Drag.Data returns the full path, with QT5 all i get is
'firefox.desktop' no path :(


Wishing well
BruceS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20211220/bd740f6e/attachment.htm>


More information about the User mailing list