diff --git a/wxPython/wx/tools/XRCed/tree.py b/wxPython/wx/tools/XRCed/tree.py index e2ab28a403..949046400e 100644 --- a/wxPython/wx/tools/XRCed/tree.py +++ b/wxPython/wx/tools/XRCed/tree.py @@ -1038,7 +1038,10 @@ class XML_Tree(wx.TreeCtrl): wx.EVT_CLOSE(testWin, self.OnCloseTestWin) wx.EVT_SIZE(testWin, self.OnSizeTestWin) # Add drop target - testWin.SetDropTarget(DropTarget()) + if testWin.panel: + testWin.panel.SetDropTarget(DropTarget()) + else: + testWin.SetDropTarget(DropTarget()) # Reset highlights testWin.highLight = testWin.highLightDT = None if highLight and not self.pendingHighLight: