GTKdialog: How to add dragndrop to an button icon

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Post Reply
Message
Author
stemsee

GTKdialog: How to add dragndrop to an button icon

#1 Post by stemsee »

I have a gtkdialog widget consisting of a grid of icon buttons. I want one of those to accept dragndrop data; only need to get the data paths dropped there and specify the action.

here is the button

Code: Select all

   <button>
         <input file>/root/noob/files/128/mplayer.png</input>
         <action>exec /root/noob/files/refdnd &</action>
   </button>
Attachments
xscreenshot-20170430T094100.png
refdnd
(249.49 KiB) Downloaded 238 times

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

#2 Post by MochiMoppel »

Not possible with button widgets.
You could however create a "fake button", an entry widget with an image background. Could be made clickable and could be dropped onto.

stemsee

#3 Post by stemsee »

Thanks MochiMoppel, I will try it.

Post Reply