in reply to Drag and Drop in Tkx

To make your struggle seem easier, remember that Drag-n-Drop is one of the hardest tricks to implement in a bug free manner. That is why you see very few good working examples. So if you do succeed... post a working demo, for the people seeking later. :-)

I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku

Replies are listed 'Best First'.
Re^2: Drag and Drop in Tkx
by David S (Sexton) on Jan 26, 2010 at 11:59 UTC
    The Perl/Tk version of my script seems fine as far as drag-n-drop. Just can't decipher the Perl/Tkx way to do it. Might have to abandon my attempts and stick with what I have with Tk. This is taking too much time away from my real job! I will definitely post something once I know how to do it. I've seen too many posts where someone will have a problem, get some help and then they'll announce that they solved it, leaving everyone else up in the air as far as the solution.
      As an update, I still don't know how to use drag and drop in Tkx. Some of the suggestions don't really help. The BWidget example: Drag and Drop Demo, is in TCL not Perl. It is not clear how to convert from TCL to Perl/Tkx, especially in terms of drag and drop. The gentle introduction at Tkx:Tutorial doesn't mention drag and drop. The tutorial at www.tkdocs.com/tutorial does not explain how to do drag and drop and I contacted the tutorial's author and he said:

      "I'm not aware of any specific info about drag and drop in Tkx. Because it isn't a standard part of Tk, it's not automatically made a part of Tkx like the built-in Tk things are."

      It was suggested that I sent a query to tcltk@perl.org, which I did, but didn't hear anything back. Any additional help would be appreciated.
        I'm assuming you've moved on from this problem, but here's something that might help. Only the core of Tk is accessible by default, but it seems that you can get at the rest of it with a little effort. I spent all day trying to write my own Tkx tooltip functionality, and after failing to successfully debug mysterious memory leaks I stumbled upon a way to use Tk's tooltips.
        Tkx::package_require('tooltip'); Tkx::namespace_import("::tooltip::tooltip"); Tkx::tooltip($widget, "Some text.");
        Note how Tkx::tooltip won't work without the require and import lines. Perhaps you can get at Tk's drag and drop functionality in a similar manner. Good luck.
        the only sure way is to help yourself, funny :)