PEATDB/Labbook.py
def createMenuBar(self):
        """Create the menu bar for the application. """
        self.menu=Menu(self.labbook_win)
        self.proj_menu={'01New':{'cmd':self.new_project},
                        '02Open':{'cmd':self.open_project},
                        '03Close':{'cmd':self.close_project},
                        '04Save':{'cmd':self.save_project},
                        '05Save As':{'cmd':self.save_as_project},
                        '06Preferences..':{'cmd':self.showPrefsDialog},
                        '08Quit':{'cmd':self.quit}}
        if self.parent:
            self.proj_menu['08Return to Database']={'cmd':self.return_data}
        self.proj_menu=self.create_pulldown(self.menu,self.proj_menu)
        self.menu.add_cascade(label='Project',menu=self.proj_menu['var'])
        
        self.edit_menu={'01Copy':{'cmd':self.copy},
                        '02Paste':{'cmd':self.paste},
                        '03Copy Columns': {'cmd':self.copyColumns},
                        '04Paste Columns': {'cmd':self.pasteColumns}}
        self.edit_menu=self.create_pulldown(self.menu,self.edit_menu)
        self.menu.add_cascade(label='Edit',menu=self.edit_menu['var'])
        
        self.records_menu={'01Add Row':{'cmd':self.add_Row},
                         '02Delete Row':{'cmd':self.delete_Row},
                         '03Add Column':{'cmd':self.add_Column},
                         '04Delete Column':{'cmd':self.delete_Column},
                         '05Auto Add Rows':{'cmd':self.autoAdd_Rows},
                         '06Auto Add Columns':{'cmd':self.autoAdd_Columns},
                         '07Find Cell':{'cmd':self.createSearchBar},
                         '08Filter':{'cmd':self.showFilteringBar} 
                         }
        self.records_menu=self.create_pulldown(self.menu,self.records_menu)
        self.menu.add_cascade(label='Records',menu=self.records_menu['var'])

        self.sheet_menu={'01Add Sheet':{'cmd':self.add_Sheet},
                         '02Remove Sheet':{'cmd':self.delete_Sheet},
                         '03Copy Sheet':{'cmd':self.copy_Sheet},
                         '04Rename Sheet':{'cmd':self.rename_Sheet},
                         '05Merge Sheet':{'cmd':self.merge_Sheet},
                         }
        self.sheet_menu=self.create_pulldown(self.menu,self.sheet_menu)
        self.menu.add_cascade(label='Sheet',menu=self.sheet_menu['var'])

        self.IO_menu={'01Import from csv file':{'cmd':self.import_csv},
                      '02Export to csv file':{'cmd':self.export_csv},
                      '03Import external fileset':{'cmd':self.import_fileset},
                      }

        self.IO_menu=self.create_pulldown(self.menu,self.IO_menu)
        self.menu.add_cascade(label='Import/Export',menu=self.IO_menu['var'])


        self.view_menu = Menu(self.menu, tearoff=0)
        self.view_menu.add_radiobutton(label="Normal View", state=ACTIVE,command=self.normal_view)
        self.view_menu.add_radiobutton(label="Page View", command=self.page_view)
        self.view_menu.add_command(label="Show All", command=self.showAll)  
        self.menu.add_cascade(label='View',menu=self.view_menu)

        #
        # Help menu
        #
        self.help_menu={'01Online Help':{'cmd':self.online_documentation},
                        '02About':{'cmd':self.about_Labbook}}
        self.help_menu=self.create_pulldown(self.menu,self.help_menu)
        self.menu.add_cascade(label='Help',menu=self.help_menu['var'])

        self.labbook_win.config(menu=self.menu)

        return
Create the menu bar for the application. 
Create the menu bar for the application.
Create the menu bar for the application .
def createMenuBar(self):
        self.menu=Menu(self.labbook_win)
        self.proj_menu={'01New':{'cmd':self.new_project},
                        '02Open':{'cmd':self.open_project},
                        '03Close':{'cmd':self.close_project},
                        '04Save':{'cmd':self.save_project},
                        '05Save As':{'cmd':self.save_as_project},
                        '06Preferences..':{'cmd':self.showPrefsDialog},
                        '08Quit':{'cmd':self.quit}}
        if self.parent:
            self.proj_menu['08Return to Database']={'cmd':self.return_data}
        self.proj_menu=self.create_pulldown(self.menu,self.proj_menu)
        self.menu.add_cascade(label='Project',menu=self.proj_menu['var'])
        self.edit_menu={'01Copy':{'cmd':self.copy},
                        '02Paste':{'cmd':self.paste},
                        '03Copy Columns': {'cmd':self.copyColumns},
                        '04Paste Columns': {'cmd':self.pasteColumns}}
        self.edit_menu=self.create_pulldown(self.menu,self.edit_menu)
        self.menu.add_cascade(label='Edit',menu=self.edit_menu['var'])
        self.records_menu={'01Add Row':{'cmd':self.add_Row},
                         '02Delete Row':{'cmd':self.delete_Row},
                         '03Add Column':{'cmd':self.add_Column},
                         '04Delete Column':{'cmd':self.delete_Column},
                         '05Auto Add Rows':{'cmd':self.autoAdd_Rows},
                         '06Auto Add Columns':{'cmd':self.autoAdd_Columns},
                         '07Find Cell':{'cmd':self.createSearchBar},
                         '08Filter':{'cmd':self.showFilteringBar} 
                         }
        self.records_menu=self.create_pulldown(self.menu,self.records_menu)
        self.menu.add_cascade(label='Records',menu=self.records_menu['var'])
        self.sheet_menu={'01Add Sheet':{'cmd':self.add_Sheet},
                         '02Remove Sheet':{'cmd':self.delete_Sheet},
                         '03Copy Sheet':{'cmd':self.copy_Sheet},
                         '04Rename Sheet':{'cmd':self.rename_Sheet},
                         '05Merge Sheet':{'cmd':self.merge_Sheet},
                         }
        self.sheet_menu=self.create_pulldown(self.menu,self.sheet_menu)
        self.menu.add_cascade(label='Sheet',menu=self.sheet_menu['var'])
        self.IO_menu={'01Import from csv file':{'cmd':self.import_csv},
                      '02Export to csv file':{'cmd':self.export_csv},
                      '03Import external fileset':{'cmd':self.import_fileset},
                      }
        self.IO_menu=self.create_pulldown(self.menu,self.IO_menu)
        self.menu.add_cascade(label='Import/Export',menu=self.IO_menu['var'])
        self.view_menu = Menu(self.menu, tearoff=0)
        self.view_menu.add_radiobutton(label="Normal View", state=ACTIVE,command=self.normal_view)
        self.view_menu.add_radiobutton(label="Page View", command=self.page_view)
        self.view_menu.add_command(label="Show All", command=self.showAll)  
        self.menu.add_cascade(label='View',menu=self.view_menu)
         Help menu
        self.help_menu={'01Online Help':{'cmd':self.online_documentation},
                        '02About':{'cmd':self.about_Labbook}}
        self.help_menu=self.create_pulldown(self.menu,self.help_menu)
        self.menu.add_cascade(label='Help',menu=self.help_menu['var'])
        self.labbook_win.config(menu=self.menu)
        return
def createMenuBar ( self ) : self . menu = Menu ( self . labbook_win ) self . proj_menu = { '01New' : { 'cmd' : self . new_project } , '02Open' : { 'cmd' : self . open_project } , '03Close' : { 'cmd' : self . close_project } , '04Save' : { 'cmd' : self . save_project } , '05Save As' : { 'cmd' : self . save_as_project } , '06Preferences..' : { 'cmd' : self . showPrefsDialog } , '08Quit' : { 'cmd' : self . quit } } if self . parent : self . proj_menu [ '08Return to Database' ] = { 'cmd' : self . return_data } self . proj_menu = self . create_pulldown ( self . menu , self . proj_menu ) self . menu . add_cascade ( label = 'Project' , menu = self . proj_menu [ 'var' ] ) self . edit_menu = { '01Copy' : { 'cmd' : self . copy } , '02Paste' : { 'cmd' : self . paste } , '03Copy Columns' : { 'cmd' : self . copyColumns } , '04Paste Columns' : { 'cmd' : self . pasteColumns } } self . edit_menu = self . create_pulldown ( self . menu , self . edit_menu ) self . menu . add_cascade ( label = 'Edit' , menu = self . edit_menu [ 'var' ] ) self . records_menu = { '01Add Row' : { 'cmd' : self . add_Row } , '02Delete Row' : { 'cmd' : self . delete_Row } , '03Add Column' : { 'cmd' : self . add_Column } , '04Delete Column' : { 'cmd' : self . delete_Column } , '05Auto Add Rows' : { 'cmd' : self . autoAdd_Rows } , '06Auto Add Columns' : { 'cmd' : self . autoAdd_Columns } , '07Find Cell' : { 'cmd' : self . createSearchBar } , '08Filter' : { 'cmd' : self . showFilteringBar } } self . records_menu = self . create_pulldown ( self . menu , self . records_menu ) self . menu . add_cascade ( label = 'Records' , menu = self . records_menu [ 'var' ] ) self . sheet_menu = { '01Add Sheet' : { 'cmd' : self . add_Sheet } , '02Remove Sheet' : { 'cmd' : self . delete_Sheet } , '03Copy Sheet' : { 'cmd' : self . copy_Sheet } , '04Rename Sheet' : { 'cmd' : self . rename_Sheet } , '05Merge Sheet' : { 'cmd' : self . merge_Sheet } , } self . sheet_menu = self . create_pulldown ( self . menu , self . sheet_menu ) self . menu . add_cascade ( label = 'Sheet' , menu = self . sheet_menu [ 'var' ] ) self . IO_menu = { '01Import from csv file' : { 'cmd' : self . import_csv } , '02Export to csv file' : { 'cmd' : self . export_csv } , '03Import external fileset' : { 'cmd' : self . import_fileset } , } self . IO_menu = self . create_pulldown ( self . menu , self . IO_menu ) self . menu . add_cascade ( label = 'Import/Export' , menu = self . IO_menu [ 'var' ] ) self . view_menu = Menu ( self . menu , tearoff = 0 ) self . view_menu . add_radiobutton ( label = "Normal View" , state = ACTIVE , command = self . normal_view ) self . view_menu . add_radiobutton ( label = "Page View" , command = self . page_view ) self . view_menu . add_command ( label = "Show All" , command = self . showAll ) self . menu . add_cascade ( label = 'View' , menu = self . view_menu ) self . help_menu = { '01Online Help' : { 'cmd' : self . online_documentation } , '02About' : { 'cmd' : self . about_Labbook } } self . help_menu = self . create_pulldown ( self . menu , self . help_menu ) self . menu . add_cascade ( label = 'Help' , menu = self . help_menu [ 'var' ] ) self . labbook_win . config ( menu = self . menu ) return
Create the menu bar for the application.
Create the menu bar for the application .
"""Create the menu bar for the application. """ # # Help menu #
self