def __init__(self, *args, **kwds): kwds["style"] = wx.TAB_TRAVERSAL wx.Panel.__init__(self, *args, **kwds) tc = [] self.panel_tabs = wx.Panel(self, -1) self.panel_panels = wx.Panel(self, -1) self.button_biodata = wx.Button(self.panel_tabs, -1, 'Biodata', style=wx.NO_BORDER) self.button_education = wx.Button(self.panel_tabs, -1, 'Education', style=wx.NO_BORDER) self.button_medical = wx.Button(self.panel_tabs, -1, 'Medical', style=wx.NO_BORDER) self.button_fees = wx.Button(self.panel_tabs, -1, 'Fees', style=wx.NO_BORDER) self.button_contacts = wx.Button(self.panel_tabs, -1, 'Contacts', style=wx.NO_BORDER) self.pane_biodata = panel_bio(self.panel_panels, -1) self.pane_education = panel_education(self.panel_panels, -1) self.pane_medical = panel_medical(self.panel_panels, -1) self.pane_fees = panel_fees(self.panel_panels, -1) self.pane_contacts = panel_guardian_details(self.panel_panels, -1) self.button_edit = wx.Button(self, -1, "Edit") self.button_new = wx.Button(self, -1, "New") self.panes =[self.pane_biodata, self.pane_education, self.pane_medical, self.pane_fees, self.pane_contacts] self.pane_biodata.SetName( 'pane_biodata') self.pane_education.SetName('pane_education') self.pane_medical.SetName( 'pane_medical') self.pane_fees.SetName( 'pane_fees') self.pane_contacts.SetName( 'pane_contacts') self.tabs =[self.button_biodata, self.button_education, self.button_medical, self.button_contacts, self.button_fees] pub.subscribe(self.displayData, 'student.selected') self.Bind(wx.EVT_BUTTON, self.OnEdit, self.button_edit) self.Bind(wx.EVT_BUTTON, self.OnNew, self.button_new) self.Bind(wx.EVT_BUTTON, self.OnBio, self.button_biodata) self.Bind(wx.EVT_BUTTON, self.OnEdu, self.button_education) self.Bind(wx.EVT_BUTTON, self.OnMedical, self.button_medical) self.Bind(wx.EVT_BUTTON, self.OnContacts, self.button_contacts) self.Bind(wx.EVT_BUTTON, self.OnFees, self.button_fees) self.__set_properties() self.__do_layout() self.__do_main()
def __init__(self, *args, **kwds): kwds["style"] = wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER | wx.THICK_FRAME wx.Dialog.__init__(self, *args, **kwds) tc = [] self.panel_panels = wx.Panel(self, -1) self.pane_biodata = panel_bio(self.panel_panels, -1) self.pane_education = panel_education(self.panel_panels, -1) self.pane_medical = panel_medical(self.panel_panels, -1) self.pane_fees = panel_fees(self.panel_panels, -1) self.pane_contacts = panel_guardian_details(self.panel_panels, -1) self.panes =[self.pane_biodata, self.pane_education, self.pane_medical, self.pane_fees, self.pane_contacts] self.pane_dict = {'pane_biodata': self.pane_biodata, 'pane_education':self.pane_education, 'pane_medical': self.pane_medical, 'pane_fees': self.pane_fees, 'pane_contacts':self.pane_contacts} self.pane_biodata.SetName( 'pane_biodata') self.pane_education.SetName('pane_education') self.pane_medical.SetName( 'pane_medical') self.pane_fees.SetName( 'pane_fees') self.pane_contacts.SetName( 'pane_contacts') self.panel_buttons = wx.Panel(self,-1) self.button_save = wx.Button(self.panel_buttons, -1, "Save") self.button_cancel = wx.Button(self.panel_buttons, -1, "Cancel") self.Bind(wx.EVT_BUTTON, self.OnSave, self.button_save) self.Bind(wx.EVT_BUTTON, self.OnCancel, self.button_cancel) self.__set_properties() self.__do_layout() self.__do_main()