提交 97e82305 编写于 作者: ThinkPet's avatar ThinkPet

上传新文件

上级 cde967e7
import wx
class MainFrame(wx.Frame):
def __init__(self):
wx.Frame.__init__(self, None, title="Main Window")
self.panel = wx.Panel(self)
self.button = wx.Button(self.panel, label="Open New Window")
self.button.Bind(wx.EVT_BUTTON, self.on_button_click)
def on_button_click(self, event):
NewFrame().Show()
class NewFrame(wx.Frame):
def __init__(self):
wx.Frame.__init__(self, None, title="New Window")
if __name__ == '__main__':
app = wx.App()
wx.ScreenDC().SetUserScale(1.25, 1.25) # 设置屏幕比例
frame = MainFrame()
frame.Show()
app.MainLoop()
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册