我们从Python开源项目中,提取了以下7个代码示例,用于说明如何使用wx.FileDropTarget()。
def __init__(self, window): wx.FileDropTarget.__init__(self) self.window = window
def __init__(self, widgt): wx.FileDropTarget.__init__(self) self.widgt = widgt
def __init__(self, parent): wx.Panel.__init__(self, parent = parent) file_drop_target = FileDropTarget(self) lbl = wx.StaticText(self, label="Drag Transactions File here:") self.fileTextCtrl = wx.TextCtrl(self, style=wx.TE_MULTILINE|wx.VSCROLL|wx.TE_READONLY) self.fileTextCtrl.SetDropTarget(file_drop_target) button = wx.Button(self, label = "Process File") button.Bind(wx.EVT_LEFT_DOWN, self.process_file) sizer = wx.BoxSizer(wx.VERTICAL) sizer.Add(lbl, 1, wx.ALL, 5) sizer.Add(self.fileTextCtrl, 10, wx.EXPAND|wx.ALL, 10) sizer.Add(button, 1, wx.ALIGN_CENTER, 5) self.SetSizer(sizer) self.text = ""
def __init__(self, window): """Constructor""" wx.FileDropTarget.__init__(self) self.window = window