0
[問題] 如果我結合tkinter和wxpython,然後應用程序。窗口將凍結。 因此請分享一個提示。 我認爲它與線程有關,但我無法完全理解它。如何結合tkinter和wxpython而不凍結窗口 - python?
[CODE]
from Tkinter import *
master = Tk()
def getFiles():
import wx
app = wx.App(False)
locale = wx.Locale(wx.LANGUAGE_ENGLISH)
frame = wx.Frame(None, wx.ID_ANY, "test", style=wx.MINIMIZE_BOX | wx.SYSTEM_MENU | wx.CAPTION | wx.CLOSE_BOX | wx.CLIP_CHILDREN)
frame.Center()
frame.SetBackgroundColour('LIGHTGREY')
frame.SetSize(200,400)
# Create grid manager instance
sizer = wx.GridBagSizer()
# Create Label for: Available testcase
entry = wx.StaticText(frame, wx.ID_ANY, u"Available testcases:", wx.DefaultPosition, wx.DefaultSize, 0)
sizer.Add(entry,(1,1),(1,1),wx.EXPAND)
frame.SetSizerAndFit(sizer)
frame.Show(True) # Show the frame.
app.MainLoop()
b = Button(master, text="OK", command=lambda : getFiles())
b.pack()
master.mainloop()
[注] 我需要因爲wxPython中:GenericDirCtrl對象。 我沒有在tkinter,ttk,tix中找到相同的對象。繼續調查