Dropping files on a grid

Is it possible? If I call a wx.Grid's .SetDropTarget() method, the target's handler never gets called. Other control work fine with the same approach, but not a grid.

  I'm guessing it's because the grid is a composite class, so what do I have to do to enable a grid to handle dropped files?

-- Ed Leafe

Ed Leafe wrote:

    Is it possible? If I call a wx.Grid's .SetDropTarget() method, the target's handler never gets called. Other control work fine with the same approach, but not a grid.

    I'm guessing it's because the grid is a composite class, so what do I have to do to enable a grid to handle dropped files?

Try using the window returned from theGrid.GetGridWindow()

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Ah, that's the ticket. Thanks!

-- Ed Leafe

···

On Dec 2, 2008, at 1:28 AM, Robin Dunn wrote:

   Is it possible? If I call a wx.Grid's .SetDropTarget() method, the target's handler never gets called. Other control work fine with the same approach, but not a grid.
   I'm guessing it's because the grid is a composite class, so what do I have to do to enable a grid to handle dropped files?

Try using the window returned from theGrid.GetGridWindow()