[Gambas-user] Drag & Drop to KDE Desktop

Doriano Blengino doriano.blengino at ...1909...
Wed Dec 17 10:35:14 CET 2008


Dear Fabien,

you didn't read my message carefully. I specified I wanted to interact 
with desktop (kde), it is in the mail subject too.

Anyway, I tried your example. When doing D&D in the same application 
instance, the receiver correctly gets data and format. Dragging between 
two instances of the same application does work no more - the receiver 
(Drop event handler) only receives the format data.

This is encouraging. This evening I will try some more at home, here at 
work I don't have KDE.

Cheers,
Doriano.



Fabien Bodard ha scritto:
> it's not a gambas ability the problem is to give the good data format
>
>
> ' Gambas class file
>
> PUBLIC SUB _new()
>
> END
>
> PUBLIC SUB Form_Open()
> ListBox1.Add(Application.Path &/ "FMain.form")
> END
>
> PUBLIC SUB ListBox1_Drag()
>
>
>
> END
>
> PUBLIC SUB ListBox1_Drop()
>
>
>
> END
>
> PUBLIC SUB Form_Drop()
>
>   Message(Drag.Data)
>   PRINT Drag.Format
>
> END
>
> PUBLIC SUB ListBox1_MouseDown()
>
>   ListBox1.Drag(ListBox1[0].Text, "text/uri-list")
>
>
> END
>
>
> 2008/12/17 Doriano Blengino <doriano.blengino at ...1909...>:
>   
>> M0E Lnx ha scritto:
>>     
>>> AFAIK, such a feature doesn't exist yet... I remember asking about it
>>> some time ago.
>>> At least not in 2.x
>>>
>>> On Tue, Dec 16, 2008 at 2:15 PM, Doriano Blengino
>>> <doriano.blengino at ...1909...> wrote:
>>>
>>>       
>>>> Hi list,
>>>>
>>>> how can I implement drag&drop with the desktop?
>>>>
>>>> I mean, drag an item (a filename, for example) to an icon on the
>>>> desktop, and viceversa, a file from a file manager to a running gambas
>>>> application?
>>>>
>>>>
>>>>
>>>>         
>>>       
>> I should refine my question. Probably gambas does not have native
>> support for this, but I am not afraid to declare external functions to
>> implement it. Those function probably are found in kdelibs. The problem
>> is: what to search for in those libs? And could a gambas program cope
>> with data types and callbacks, events ar whatever required to do this?
>>
>>     





More information about the User mailing list