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 = ""
评论列表
文章目录