wxPython之XRC加载流水账.2
用下面的代码,执行结果是正确的。不知道为什么,如果有StatusBar,总会少一点,resize之后正常。
#-*- coding: utf-8 -*-
import wx
import wx.xrc as xrc
class MyApp(wx.App):
def OnInit(self):
self.res = xrc.XmlResource(r'./cr01.xrc')
self.frame_1 = self.res.LoadFrame(None, 'MyFrame2')
self.frame_1.Show(True)
return 1
if '__main__' == __name__:
app = MyApp()
app.MainLoop()
重要的参考文件 :
wxPython中XRC文件i18n示例
#-*- coding: utf-8 -*-
import wx
import wx.xrc as xrc
class MyApp(wx.App):
def OnInit(self):
self.res = xrc.XmlResource(r'./cr01.xrc')
self.frame_1 = self.res.LoadFrame(None, 'MyFrame2')
self.frame_1.Show(True)
return 1
if '__main__' == __name__:
app = MyApp()
app.MainLoop()
重要的参考文件 :
wxPython中XRC文件i18n示例

0 条评论:
发表评论
<< 主页