DNATool2/DNAToolApp.py
def createMenuBar(self):
        """Create the menu bar for the application. """
        self.menu=Menu(self.main)
        self.file_menu={'01Open Project':{'cmd':self.openProject},
                        '02Open Sequence':{'cmd':self.openSequence},
                        '05Quit':{'cmd':self.quit}}
        self.file_menu=self.create_pulldown(self.menu,self.file_menu)
        self.menu.add_cascade(label='File',menu=self.file_menu['var'])
        self.edit_menu={'01Undo':{'cmd':self.undo},
                        '02Copy':{'cmd':self.copy},
                        '03Select All':{'cmd':self.sc.selectAll},
                        '04Configure Restriction Enzymes':{'cmd':self.restrictionEnzymesDialog}}
        self.edit_menu=self.create_pulldown(self.menu,self.edit_menu)
        self.menu.add_cascade(label='Edit',menu=self.edit_menu['var'])

        self.primer_menu={'01Primer DB':{'cmd':self.createPrimerDBGUI}}
        self.primer_menu=self.create_pulldown(self.menu,self.primer_menu)
        self.menu.add_cascade(label='Primer Tools',menu=self.primer_menu['var'])

        self.seqanal_menu={'01x':{'cmd':self.openSequence}}
        self.seqanal_menu=self.create_pulldown(self.menu,self.seqanal_menu)
        self.menu.add_cascade(label='Sequence Analysis',menu=self.seqanal_menu['var'])

        self.view_menu=Menu(self.menu)
        self.menu.add_cascade(label='Tools',menu=self.view_menu)
        self.appsvars = {}
        for i in self.apps.keys():
            self.appsvars[i] = IntVar()
            def func(args):
                def new():
                    self.toggleApps(args)
                return new
            self.view_menu.add_checkbutton(label=i, onvalue=True,
                                            offvalue=False,
                                            command=func(i),
                                            variable=self.appsvars[i])

        self.help_menu={ '01Online Help':{'cmd': self.help},
                         '02About':{'cmd': self.about},}
        self.help_menu=self.create_pulldown(self.menu,self.help_menu)
        self.menu.add_cascade(label='Help',menu=self.help_menu['var'])
        self.main.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.main)
        self.file_menu={'01Open Project':{'cmd':self.openProject},
                        '02Open Sequence':{'cmd':self.openSequence},
                        '05Quit':{'cmd':self.quit}}
        self.file_menu=self.create_pulldown(self.menu,self.file_menu)
        self.menu.add_cascade(label='File',menu=self.file_menu['var'])
        self.edit_menu={'01Undo':{'cmd':self.undo},
                        '02Copy':{'cmd':self.copy},
                        '03Select All':{'cmd':self.sc.selectAll},
                        '04Configure Restriction Enzymes':{'cmd':self.restrictionEnzymesDialog}}
        self.edit_menu=self.create_pulldown(self.menu,self.edit_menu)
        self.menu.add_cascade(label='Edit',menu=self.edit_menu['var'])
        self.primer_menu={'01Primer DB':{'cmd':self.createPrimerDBGUI}}
        self.primer_menu=self.create_pulldown(self.menu,self.primer_menu)
        self.menu.add_cascade(label='Primer Tools',menu=self.primer_menu['var'])
        self.seqanal_menu={'01x':{'cmd':self.openSequence}}
        self.seqanal_menu=self.create_pulldown(self.menu,self.seqanal_menu)
        self.menu.add_cascade(label='Sequence Analysis',menu=self.seqanal_menu['var'])
        self.view_menu=Menu(self.menu)
        self.menu.add_cascade(label='Tools',menu=self.view_menu)
        self.appsvars = {}
        for i in self.apps.keys():
            self.appsvars[i] = IntVar()
            def func(args):
                def new():
                    self.toggleApps(args)
                return new
            self.view_menu.add_checkbutton(label=i, onvalue=True,
                                            offvalue=False,
                                            command=func(i),
                                            variable=self.appsvars[i])
        self.help_menu={ '01Online Help':{'cmd': self.help},
                         '02About':{'cmd': self.about},}
        self.help_menu=self.create_pulldown(self.menu,self.help_menu)
        self.menu.add_cascade(label='Help',menu=self.help_menu['var'])
        self.main.config(menu=self.menu)
        return
def createMenuBar ( self ) : self . menu = Menu ( self . main ) self . file_menu = { '01Open Project' : { 'cmd' : self . openProject } , '02Open Sequence' : { 'cmd' : self . openSequence } , '05Quit' : { 'cmd' : self . quit } } self . file_menu = self . create_pulldown ( self . menu , self . file_menu ) self . menu . add_cascade ( label = 'File' , menu = self . file_menu [ 'var' ] ) self . edit_menu = { '01Undo' : { 'cmd' : self . undo } , '02Copy' : { 'cmd' : self . copy } , '03Select All' : { 'cmd' : self . sc . selectAll } , '04Configure Restriction Enzymes' : { 'cmd' : self . restrictionEnzymesDialog } } self . edit_menu = self . create_pulldown ( self . menu , self . edit_menu ) self . menu . add_cascade ( label = 'Edit' , menu = self . edit_menu [ 'var' ] ) self . primer_menu = { '01Primer DB' : { 'cmd' : self . createPrimerDBGUI } } self . primer_menu = self . create_pulldown ( self . menu , self . primer_menu ) self . menu . add_cascade ( label = 'Primer Tools' , menu = self . primer_menu [ 'var' ] ) self . seqanal_menu = { '01x' : { 'cmd' : self . openSequence } } self . seqanal_menu = self . create_pulldown ( self . menu , self . seqanal_menu ) self . menu . add_cascade ( label = 'Sequence Analysis' , menu = self . seqanal_menu [ 'var' ] ) self . view_menu = Menu ( self . menu ) self . menu . add_cascade ( label = 'Tools' , menu = self . view_menu ) self . appsvars = { } for i in self . apps . keys ( ) : self . appsvars [ i ] = IntVar ( ) def func ( args ) : def new ( ) : self . toggleApps ( args ) return new self . view_menu . add_checkbutton ( label = i , onvalue = True , offvalue = False , command = func ( i ) , variable = self . appsvars [ i ] ) self . help_menu = { '01Online Help' : { 'cmd' : self . help } , '02About' : { 'cmd' : self . about } , } self . help_menu = self . create_pulldown ( self . menu , self . help_menu ) self . menu . add_cascade ( label = 'Help' , menu = self . help_menu [ 'var' ] ) self . main . 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. """
self