def __init__(self):
wx.Frame.__init__(self, None, wx.ID_ANY,
"File and Folder Dialogs Tutorial")
panel = wx.Panel(self, wx.ID_ANY)
self.currentDirectory = os.getcwd()
# create the buttons and bindings
dirDlgBtn1 = wx.Button(panel, label="Choose Source")
dirDlgBtn1.Bind(wx.EVT_BUTTON, self.onDir1)
dirDlgBtn2 = wx.Button(panel, label="Choose Destination")
dirDlgBtn2.Bind(wx.EVT_BUTTON, self.onDir2)
moveBtn=wx.Button(panel, label="Check and Move Files")
moveBtn.Bind(wx.EVT_BUTTON, self.moveUFiles)
# put the buttons in a sizer
sizer = wx.BoxSizer(wx.VERTICAL)
sizer.Add(dirDlgBtn1, 0, wx.ALL|wx.CENTER, 5)
sizer.Add(dirDlgBtn2, 0, wx.ALL|wx.CENTER, 5)
sizer.Add(moveBtn, 0, wx.ALL|wx.CENTER, 5)
panel.SetSizer(sizer)
评论列表
文章目录