On Sat, Sep 19, 2009 at 6:11 AM, Jeff Hobbs <je...@activestate.com> wrote:
> > Yes, tkdnd could be added to a standalone app, inserted into the tkkit if > you use ActivePerl/PDK, or otherwise as I believe Vadim has an alternative > solution. For tkkit, I have posted instructions to this list before about > adding modules. It does require an ActiveTcl installation (although it > would be possible within Tkx itself ... it's slightly more complicated than > the Tcl script I sent). > > The BWidget dnd model would work with Ttk (tile / themed Tk), but you would > have to extend the code for that. Tkdnd is a C-based extension that works > (via overlay bindings) for any widget, but also ties directly in to the > native dnd for the platform. It's not yet ported to OS X, but someone is > working on it. > > Jeff > As native dnd is probaby what most people want (including me), it seems that Tkdnd is the way to go. If I remember rightly, this would involve installing ActiveTcl, installing the Tkdnd module under ActiveTcl, then pointing Tkx to ActiveTcl instead of the regular tkkit, and finally creating the standalone app with PDK, with all necessary modules being pulled from ActiveTcl. The next thing to do would be to convert the Tkdnd script that Vadim sent earlier into Tkx syntax: #the line below is just creating a widget - no "dnd" consideration pack [entry .frTop1.current_dir -textvariable ptclv_current_dir] -side left -fill x -expand 1 # and this actually makes DND work tkdnd::drop_target register .frTop1.current_dir * bind .frTop1.current_dir <<Drop:DND_Files>> { set ptclv_current_dir [lindex %D 0] ptcl_refresh } Here, I'm not familiar with the <<Drop:DND_Files>> code, but the rest is probably OK (although I worry about the syntax for the set command set ptclv_current_dir [lindex %D 0] I feel a complete novice here even though I've written several large Tkx apps. I worry that others (especially coming from PerlTk) will be completely lost. Laurence.