def __init__(self, *args, **kwds): kwds["style"] = wx.DEFAULT_FRAME_STYLE wx.Frame.__init__(self, *args, **kwds) menubar = wx.MenuBar() fileMenu = wx.Menu() mnuitem1 = fileMenu.Append(-1, 'Forms', 'Edit Forms') mnuitem2 = fileMenu.Append(-1, 'Courses', 'Edit Courses') menubar.Append(fileMenu, '&Settings') self.SetMenuBar(menubar) self.Bind(wx.EVT_MENU, self.OnForms, mnuitem1) self.Bind(wx.EVT_MENU, self.OnCourses, mnuitem2) self.sb = CustomStatusBar(self) self.SetStatusBar(self.sb) self.panel_left = wx.Panel(self, -1) self.logo = wx.Button(self.panel_left, -1, '') self.button_year = wx.Button(self.panel_left, -1, '2014/15') self.tree = wx.TreeCtrl(self.panel_left, -1, style=wx.TR_HAS_BUTTONS + wx.TR_HIDE_ROOT | wx.TR_DEFAULT_STYLE | wx.SUNKEN_BORDER) gVar.schYr = 2015 self.pane_suppliers = panel_suppliers(self, -1) self.pane_ledger = panel_ledger(self, -1) self.pane_accounts = panel_accounts(self, -1) self.pane_journal = panel_journal(self, -1) self.pane_payments = panel_payments(self, -1) self.pane_payments_registrations = panel_payments_registrations(self, -1) self.panes_dict = { 'Suppliers' : self.pane_suppliers, 'Ledger': self.pane_ledger, 'Accounts': self.pane_accounts, 'Journal': self.pane_journal, 'Student Payments': self.pane_payments, 'Registration Payments': self.pane_payments_registrations} self.Bind(wx.EVT_TREE_SEL_CHANGED, self.OnTreeItemSelected, self.tree) pub.subscribe(self.lockdown, 'lockdown') pub.subscribe(self.unlockdown, 'unlockdown') pub.subscribe(self.updateSB, 'accounts.updateSB') self.__set_properties() self.__do_layout() self.__do_main()
def __init__(self, *args, **kwds): kwds["style"] = wx.DEFAULT_FRAME_STYLE wx.Frame.__init__(self, *args, **kwds) gVar.schYr = 2015 menubar = wx.MenuBar() fileMenu = wx.Menu() mnuitem1 = fileMenu.Append(-1, 'Forms', 'Edit Forms') mnuitem2 = fileMenu.Append(-1, 'Courses', 'Edit Courses') menubar.Append(fileMenu, '&Settings') self.SetMenuBar(menubar) self.statusbar = CustomStatusBar(self) self.SetStatusBar(self.statusbar) self.panel_tree = wx.Panel(self, -1) self.panel_tree_top = wx.Panel(self.panel_tree, -1) self.logo = wx.Button(self.panel_tree_top, -1, '') self.button_year = wx.Button(self.panel_tree_top, -1, '2015/16') self.tree = self.__createTreeCtrl() #self._createComboTreeBox(0) self.panel_main = wx.Panel(self, -1) self.pane_base = panel_base(self.panel_main, -1) self.pane_ledger = panel_ledger(self.panel_main, -1) self.pane_journal = panel_journal(self.panel_main, -1) self.pane_payments = panel_payments(self.panel_main, -1) self.pane_accounts = panel_accounts(self.panel_main, -1) self.pane_suppliers = panel_suppliers(self.panel_main, -1) self.pane_course_fees = panel_course_fees(self.panel_main, -1) self.pane_edit_school = panel_edit_school(self.panel_main, -1) self.pane_edit_booking = panel_edit_booking(self.panel_main, -1) self.pane_edit_address = panel_edit_address(self.panel_main, -1) self.pane_edit_guardian = panel_edit_guardian(self.panel_main, -1) self.pane_student_list = panel_student_list(self.panel_main, -1) self.pane_excul = panel_excul(self.panel_main, -1) self.pane_student_details = panel_student_details(self.panel_main, -1) self.pane_course_bookings = panel_course_bookings(self.panel_main, -1) self.pane_edit_rereg_status = panel_edit_rereg_status(self.panel_main, -1) self.pane_class_rereg_status = panel_form_reregStatus(self.panel_main, -1) self.pane_edit_booking_status = panel_edit_booking_status(self.panel_main, -1) self.pane_payments_registrations = panel_payments_registrations(self.panel_main, -1) self.pane_courses_by_year_picker = panel_courses_picker(self.panel_main, -1) self.pane_edit_booking_student_details = panel_edit_booking_student_details(self.panel_main, -1) self.panes_dict = { 'Suppliers' : self.pane_suppliers, 'Ledger': self.pane_ledger, 'Accounts': self.pane_accounts, 'Journal': self.pane_journal, 'Student Payments': self.pane_payments, 'Registration Payments': self.pane_payments_registrations, 'Base': self.pane_base, 'Excur': self.pane_excul, 'Course Fees': self.pane_course_fees, 'Schools': self.pane_edit_school , 'Bookings': self.pane_edit_booking , 'Address': self.pane_edit_address , 'Guardians': self.pane_edit_guardian , 'Student Details': self.pane_student_details , 'Course Bookings': self.pane_course_bookings , 'Form Rereg Status': self.pane_class_rereg_status , 'Edit Rereg Status': self.pane_edit_rereg_status , 'Edit Booking Status': self.pane_edit_booking_status , 'Courses By Year': self.pane_courses_by_year_picker , 'Booking Student Details':self.pane_edit_booking_student_details, 'Students': self.pane_student_list } self.Bind(wx.EVT_MENU, self.OnForms, mnuitem1) self.Bind(wx.EVT_MENU, self.OnCourses, mnuitem2) self.Bind(wx.EVT_CLOSE, self.OnCloseWindow) self.Bind(wx.EVT_BUTTON, self.OnYear, self.button_year) pub.subscribe(self.write_to_statusbar0, 'write.statusbar0') pub.subscribe(self.write_to_statusbar1, 'write.statusbar1') pub.subscribe(self.write_to_statusbar2, 'write.statusbar2') pub.subscribe(self.lockdown, 'lockdown') pub.subscribe(self.unlockdown, 'unlockdown') pub.subscribe(self.updateSB, 'accounts.updateSB') self.__set_properties() self.__do_layout() self.__do_main()