Re: drag'n'drop sample application
- From: John Emmas <johne53 tiscali co uk>
- To: gtk-app-devel-list <gtk-app-devel-list gnome org>
- Subject: Re: drag'n'drop sample application
- Date: Sun, 11 Sep 2011 19:24:01 +0100
On 8 Sep 2011, at 11:20, John Emmas wrote:
On 7 Sep 2011, at 15:13, Craig wrote:
Hi John,
Depending upon your installation of gtk, I think there is a very good
example of drag and drop in the /usr/bin/gtk-demo.
[...]
Other than that, I would do a web search for gtk-demo.
Thanks for the prompt help guys. I really appreciate it.
I took a look at Allin's code which seemed really straightforward so I just built it (I'm using gtk-win32
BTW). Anyway, it builds and runs flawlessly and at least confirms that dnd is working in my copy of gtk.
I think I spoke too soon.... Allin's app provided me with a good example of dragging and dropping from
different sources (both internal to the app and also external). I also added a drag source of my own so I
could learn how it all works. My addition was just something very simple (a label) whereas the actual app
that I'm having problems with is dragging (to and from) TreeView controls.
Luckily, the gtk toolkit provides a small application for building and testing a TreeView control -
crucially, it includes the drag'n'drop functionality. So I built the application which only needed me to
build these 2 modules:-
src/gtk+-2.20.0/tests/testtreeview.c
src/gtk+-2.20.0/prop-editor.c
First I compiled the app in Linux (linking to gtk-x11) and then in Windows (linking to gtk-win32). To my
amazement, this small sample app exhibits the same problem as the bigger one that I was originally trying to
debug - i.e. dnd works in the Linux build but not in the Windows build. Running the app in Linux, I can
re-order its treeview items by dragging and dropping. However, this just doesn't work in the Windows
version. I've established that drag'n'drop does work for other gtk objects but I haven't found any way of
making it work with a TreeView control..!
I know there aren't many people here who use gtk-win32 but if anyone does (and can spare a few minutes) could
you try building those two modules and see if you can reproduce the problem? I'd like to find out if
TreeView dnd is something that isn't working generally in gtk-win32 or if the problem is specific to my copy
for some reason. Hopefully, someone will be able to spare the time. Thanks.
John.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]