Recent

Author Topic: SOLVED FOR NOW! - Xdnd - Drag and Drop for Linux  (Read 1697 times)

Tony Stone

  • Full Member
  • ***
  • Posts: 144
SOLVED FOR NOW! - Xdnd - Drag and Drop for Linux
« on: January 01, 2022, 10:29:04 pm »
I am trying to get some control over drag and drop operations in my Linux application(some day will support Windows too).  I have been doing a bit of research and still don't know where to start.  It seems that GTK has support for doing drag and drop system operations so I am sure what I want to do is possible EXCEPT I don't want to use the default drag behavior of an edit control.

If I select text in an edit control I can drop it in other applications as text and most other applications handle this.  I however do not want to use an edit control to set the data that is being dropped in other application.  I would like to use a shape, image, button or other component to allow user to initiate the drag operation and I want to set the data as a string type.  I dont really know how to access functions of GTK... but I found this article with lots of info.  If someone has a few minutes can they take a look and maybe get me in the right direction to implement the desired behavior?  Thanks

http://www.compsci.hunter.cuny.edu/~sweiss/course_materials/csci493.70/lecture_notes/GTK_dragndrop.pdf



Update:

https://github.com/prof7bit/NativeDragDrop seems to be the solution I was looking for!  There is issues setting properties with this component in the object inspector so I set the properties at run time.  But this allows me to drag a button and drop it in other applications as a string!   :D 8-)
« Last Edit: January 01, 2022, 11:40:37 pm by Tony Stone »

Tony Stone

  • Full Member
  • ***
  • Posts: 144
Re: Xdnd - Drag and Drop for Linux
« Reply #1 on: January 01, 2022, 11:15:55 pm »
So I may be all set.  I may have found a package for Native DND... I am gonna test it and report back so I dont waste anyones time.

https://github.com/prof7bit/NativeDragDrop

 

TinyPortal © 2005-2018