如何在不编辑类frame_syslogbSizerMain
的情况下通过类SyslogFrame动态添加组件
因为UI是由wxFormBuilder生成的
class SyslogFrame(program_UI.frame_syslog):
def __init__(self,parent):
program_UI.frame_syslog.__init__(self,parent)
self.locale = wx.Locale(wx.LANGUAGE_ENGLISH)
class frame_syslog ( wx.Frame ):
def __init__( self, parent ):
wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = u"Syslog", pos = wx.DefaultPosition, size = wx.Size( 1185,714 ), style = wx.DEFAULT_FRAME_STYLE|wx.FRAME_FLOAT_ON_PARENT|wx.FRAME_NO_TASKBAR|wx.SYSTEM_MENU|wx.CLIP_CHILDREN|wx.TAB_TRAVERSAL )
self.SetSizeHints( wx.DefaultSize, wx.DefaultSize )
self.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_BTNFACE ) )
bSizerMain = wx.BoxSizer( wx.VERTICAL )
self.SetSizer( bSizerMain )
self.Layout()
self.Centre( wx.BOTH )
def __del__( self ):
pass