Drag and drop widgets

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

First, sorry if this has been asked before -- I don't know how to search the mailing list.

I'm trying to figure out how I can drag and drop widgets between boxes. My end goal is I have 20 boxes as possible drag targets and the boxes are initially populated with Gtk.Frames that you can drag between the boxes to reorganize.

For a simple example, let's assume we have a grid. Within this grid are two boxes. In one box I have a button, and the grid columns are homogenous so I see a button and free area.

I want to be able to drag the button from one box to the other, and move it.

I tried to set up one box as a drag source and the other as a drop area but I was unable to get it to work.

Can someone briefly explain the theory behind drag and drop and the process to make my example workable? Or link me to where this has already been done :)

I am doing my project in Python so preferably explain it in terms of objects and methods -- i.e. I'd prefer not to look through C code but I'm willing to decipher and convert if necessary.

Thank you very much!

Jim

_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
https://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux