Menu

#30 Toplevel Widget Cannot Be Drop Target

None
closed-fixed
None
5
2015-04-13
2015-03-12
No

Starting in version 2.7, a toplevel widget can no longer be a drop target (tested on Windows only). A workaround is to create a frame inside the window which can act as the drop target, but this breaks all existing code.

For example, this works in 2.6 but not 2.7:

package require tkdnd
::tkdnd::drop_target register . DND_Files
bind . <<DropPosition>> {list copy}

Here is the workaround:

package require tkdnd
pack [frame .frame] -expand true -fill both
::tkdnd::drop_target register .frame DND_Files
bind .frame <<DropPosition>> {list copy}

Discussion

  • Georgios Petasis

    Dear Tim,

    Thank you for reporting this. It has been fixed, and the fix is in github:
    https://github.com/petasis/tkdnd

    It will be included in TkDND 2.8, which will be released shortly.

     
  • Georgios Petasis

    • status: open --> closed-fixed
    • assigned_to: Georgios Petasis
    • Group: -->
     

Log in to post a comment.