📜  如何在 wxPython 代码示例中创建简单的窗口

📅  最后修改于: 2022-03-11 14:45:45.577000             🧑  作者: Mango

代码示例1
import wx #pip install wxPython

class myFrame(wx.Frame):
  def __init__(self):
    super().__init__(parent=None, title="Any Name you want", pos=(200, 100), size=(300,300))
    self.Icon = wx.Icon("Icon path")
    self.mainpanel = wx.Panel(self)
    self.Show()

app = wx.App()
frame = myFrame()
app.MainLoop()