Exemple #1
0
 def __init__(self, parent=None, servers={}):
     Menu.__init__(self, parent, tearoff=0, bd=5)
     self.servers = servers
     self.servers_status = {}
     self.callback = None
     for serverName in self.servers:
         self._add_item(serverName)
Exemple #2
0
	def __init__(self, parent, content, *args, **kwargs):
		Menu.__init__(self, parent, *args, **kwargs)
		self.parent = parent
		self.content = content

		# data
		self.todo_file = ''

		# top level cascades
		self.settingsMenu = Menu(self, tearoff=0)

		self.cascades = [
			{
				'name': 'settings',
				'menu': self.settingsMenu,
				'choices': [
					("set 'todo.txt' file", self.set_todo_file),
					("refresh from file", self.refresh_from_file)
				]
			},
		]

		for cascade in self.cascades:
			print(cascade)
			choices = cascade.get('choices')
			for choice in choices:
				cascade.get('menu').add_command(label=choice[0], command=choice[1])
			self.add_cascade(label=cascade.get('name'), menu=cascade.get('menu'))
Exemple #3
0
    def __init__(self, parent):
        Menu.__init__(self, parent.master)
        self.parent = parent
        self.option_add('*tearOff', False)

        file = Menu(parent.master)
        self.add_cascade(label=props.fileMenuLabel, menu=file)
        file.add_command(label=props.fileLoadCommand, command=self.load)
        file.add_command(label=props.fileUnloadCommand, command=self.unload)

        testProgram = Menu(parent.master)
        self.add_cascade(label=props.testProgramMenuLabel, menu=testProgram)
        testProgram.add_command(label=props.testProgramIoPinsCommand)
        testProgram.add_command(label=props.testProgramIoPingroupsCommand)
        testProgram.add_separator()
        testProgram.add_command(label=props.testProgramPwrPinsCommand)
        testProgram.add_command(label=props.testProgramPwrPingroupsCommand)
        testProgram.add_separator()
        testProgram.add_command(label=props.testProgramIoTestsCommand)
        testProgram.add_command(label=props.testProgramPwrTestsCommand)

        run = Menu(parent.master)
        self.add_cascade(label=props.runMenuLabel, menu=run)
        run.add_command(label=props.runAllCommand)
        run.add_command(label=props.runIoCommand)
        run.add_command(label=props.runPwrCommand)

        result = Menu(parent.master)
        self.add_cascade(label=props.resultMenuLabel, menu=result)
        result.add_command(label=props.resultIoCommand)
        result.add_command(label=props.resultPwrCommand)
    def __init__(self, parent, db, io, *args, **kwargs):
        Menu.__init__(self, parent, *args, **kwargs)
        self.parent = parent
        self.db = db
        self.io = io

        self.config(background=LBLUE)

        self.filemenu = Menu(self, tearoff=0)  # creates 'File' cascade
        self.filemenu.add_command(label="New Competition", command=self.io.new)  # each 'add_command' call creates a new
        self.filemenu.add_command(label="Save", command=self.io.save)            # selectable item for a cascade menu.
        self.filemenu.add_command(label="Save as...", command=self.io.save_as)   # the 'command' argument is the func
        self.filemenu.add_separator()                                            # that will be called when the item
        self.filemenu.add_command(label="Open", command=self.io.open)            # is clicked on. the 'add_separator'
        self.filemenu.add_command(label="Export")                                # func adds a thin black bar between
        self.filemenu.add_command(label="Print")                                 # grouped items in the cascade
        self.filemenu.add_separator()
        self.filemenu.add_command(label="Close", command=self.io.close)

        self.networkmenu = Menu(self, tearoff=0)  # creates 'Network' cascade
       # self.networkmenu.add_command(label="Connect to database", command=self.db.connect)
       # self.networkmenu.add_command(label="Configure database connection", command=self.db.prompt)
       # self.networkmenu.add_command(label="Insert competition in global database", command=self.db.open_to_global)
       # self.networkmenu.add_command(label="Refresh from database", command=self.gdb.pull)

        self.add_cascade(label="File", menu=self.filemenu, background=LBLUE)  # adds 'File' and 'Network' cascades to
        self.add_cascade(label="Network", menu=self.networkmenu)              # menubar itself.
    def __init__(self, master=None, **kwargs):
        Menu.__init__(self, master, **kwargs)

        file_menu = Menu(self, tearoff=0)
        file_menu.add_command(label='Save Data',
                              command=lambda: self.save_data)
        file_menu.add_command(label='Exit', command=self.quit)
        self.add_cascade(label='File', underline=0, menu=file_menu)

        data_menu = Menu(self, tearoff=0)
        data_menu.add_command(
            label='Courses',
            command=lambda: self.master.show_frame("CourseFrame"))
        data_menu.add_command(
            label='Enrollment',
            command=lambda: self.master.show_frame("EnrollmentFrame"))
        data_menu.add_command(
            label='Student',
            command=lambda: self.master.show_frame("StudentFrame"))
        self.add_cascade(label='Data', underline=0, menu=data_menu)

        help_menu = Menu(self, tearoff=0)
        help_menu.add_command(
            label='About',
            command=lambda: self.master.show_frame("AboutFrame"))
        self.add_cascade(label='Help', underline=0, menu=help_menu)
Exemple #6
0
 def __init__(self, master):
     Menu.__init__(self, master)
     self.add_command(label='Open',
                      command=lambda: master.add_files('dialog'))
     self.option_menu = Menu(self, tearoff=0)
     self.option_menu.add_command(label='Benchmark current mode',
                                  command=lambda: master.threaded_task(
                                      master.benchmark_current_mode))
     self.option_menu.add_command(
         label='Benchmark all modes',
         command=lambda: master.threaded_task(master.benchmark_all_modes))
     self.option_menu.add_separator()
     self.overwrite = BooleanVar()
     self.overwrite.set(True)
     self.option_menu.add_checkbutton(label='Overwrite files',
                                      onvalue=True,
                                      offvalue=False,
                                      variable=self.overwrite)
     self.bring_to_front = BooleanVar()
     self.bring_to_front.set(True)
     self.option_menu.add_checkbutton(label='Bring to front',
                                      onvalue=True,
                                      offvalue=False,
                                      variable=self.bring_to_front)
     self.add_cascade(label='Options', menu=self.option_menu)
     self.add_command(label='About', command=lambda: AboutWindow(master))
Exemple #7
0
    def __init__(self, parent, canvas_echiquier):
        Menu.__init__(self, parent)

        self.canvas_echiquier = canvas_echiquier
        self.parent = parent  # le parent est la fenetre

        menufichier = Menu(self, tearoff=0)
        menufichier.add_command(label='Nouvelle partie',
                                command=self.nouvelle_partie)
        menufichier.add_command(label="Ouvrir", command=self.charger)
        menufichier.add_command(label="Sauvegarder", command=self.sauvegarder)
        menufichier.add_separator()
        menufichier.add_command(label="Quitter", command=self.quitter)
        self.add_cascade(label="Fichier", menu=menufichier)

        # Ajout d'un menu pour les options
        menuoptions = Menu(self, tearoff=0)
        menuoptions.add_command(label="Couleur", command=self.changertheme)
        menuoptions.add_command(label="Partir le chrono",
                                command=self.partir_chrono)
        menuoptions.add_command(label="Arrêter le chrono",
                                command=self.arreter_chrono)
        self.add_cascade(label="Options", menu=menuoptions)

        menuaide = Menu(self, tearoff=0)
        menuaide.add_command(label="Règles des échecs",
                             command=self.ouvreRegles)
        self.add_cascade(label="Aide", menu=menuaide)
Exemple #8
0
 def __init__(self, root: "GUI"):
     self.root = root
     Menu.__init__(self,
                   master=root,
                   tearoff=0)
     # create 'move' menu
     self.movemenu = Menu(master=self,
                          tearoff=0)
     self.movemenu.add_command(label="Move (Horizontal)",
                               command=lambda: self.movePlayer("X"))
     self.movemenu.add_command(label="Move (Vertical)",
                               command=lambda: self.movePlayer("Y"))
     self.movemenu.add_separator()
     self.movemenu.add_command(label="Save Position",
                               command=self.savePos,
                               state='disabled')
     self.movemenu.add_command(label="Reset Position",
                               command=self.resetPos,
                               state='disabled')
     # create 'main' menu
     self.add_cascade(label="Move Player",
                      menu=self.movemenu)
     self.add_separator()
     self.add_command(label="Exit Spotify",
                      command=lambda: root.spotify.win.close())
     self.add_command(label="Close Player",
                      command=root.closePlayer)
Exemple #9
0
    def __init__(self, app, *args, **kwargs):
        """
        Constructor

        :param Frame app: reference to main tkinter application
        :param args: optional args to pass to Menu parent class
        :param kwargs: optional kwargs to pass to Menu parent class
        """

        self.__app = app  # Reference to main application class
        self.__master = self.__app.get_master()  # Reference to root class (Tk)
        Menu.__init__(self, self.__master, *args, **kwargs)

        self.option_add("*Font", "TkMenuFont")
        # Create a pull-down menu for file operations
        self.file_menu = Menu(self, tearoff=False)
        #         self.file_menu.add_command(label=MENUSAVE, underline=1,
        #                                    command=self.__app.frm_settings._save_settings)
        #         self.file_menu.add_command(label=MENULOAD, underline=1,
        #                                    command=self.__app.frm_settings._load_settings)
        self.file_menu.add_command(label=MENUEXIT,
                                   underline=1,
                                   accelerator="Ctrl-Q",
                                   command=self.__app.exit)
        self.add_cascade(menu=self.file_menu, label=MENUFILE)

        # Create a pull-down menu for view operations
        self.view_menu = Menu(self, tearoff=False)
        self.view_menu.add_command(label=MENUHIDESE,
                                   underline=1,
                                   command=self.__app.toggle_settings)
        self.view_menu.add_command(label=MENUHIDESB,
                                   underline=1,
                                   command=self.__app.toggle_status)
        self.view_menu.add_command(label=MENUHIDECON,
                                   underline=1,
                                   command=self.__app.toggle_console)
        self.view_menu.add_command(label=MENUHIDEMAP,
                                   underline=1,
                                   command=self.__app.toggle_map)
        self.view_menu.add_command(label=MENUHIDESATS,
                                   underline=1,
                                   command=self.__app.toggle_sats)
        self.add_cascade(menu=self.view_menu, label=MENUVIEW)

        # Create a pull-down menu for view operations
        self.options_menu = Menu(self, tearoff=False)
        self.options_menu.add_command(label=MENUUBXCONFIG,
                                      underline=1,
                                      command=self.__app.ubxconfig)
        self.add_cascade(menu=self.options_menu, label=MENUOPTION)

        # Create a pull-down menu for help operations
        self.help_menu = Menu(self, tearoff=False)
        self.help_menu.add_command(label=MENUABOUT,
                                   underline=1,
                                   command=self.__app.about)
        self.add_cascade(menu=self.help_menu, label=MENUHELP)
Exemple #10
0
 def __init__(self, *args, **kwargs):
     Menu.__init__(self, *args, **kwargs)
     self['bg'] = 'MediumSlateBlue'
     self['fg'] = 'gray80'
     self['font'] = ('Helvetica Neue', 9)
     self['relief'] = 'flat'
     self['activebackground'] = 'SlateBlue'
     self['activeborderwidth'] = 0
     self['borderwidth'] = 0
Exemple #11
0
 def __init__(self, main_menu) -> None:
     Menu.__init__(self)
     self.main_menu = main_menu
     self.window = main_menu.parent
     self.edit_set_menu = Menu(self)
     self.edit_game_settings_menu = EditGameSettingMenu()
     self.add_cascade(label='Edit Sets', menu=self.edit_set_menu)
     self.add_cascade(label='Edit Game Settings',
                      menu=self.edit_game_settings_menu)
     self.update_menu()
Exemple #12
0
 def __init__(self, parent: Window) -> None:
     Menu.__init__(self)
     self.parent = parent
     self.file_menu = FileMenu.FileMenu(self.parent)
     self.edit_menu = EditMenu.EditMenu(self)
     self.help_menu = HelpMenu.HelpMenu()
     self.add_cascade(label='File', menu=self.file_menu)
     self.add_cascade(label='Edit', menu=self.edit_menu)
     self.add_cascade(label='Help', menu=self.help_menu)
     return
Exemple #13
0
    def __init__(self, parent, text, command=None):
       Menu.__init__(self,parent, tearoff=0)

       text = re.split('\n', text)
       
       for t in text:
          self.add_command(label = t)
       
       self._displayed=False
       self.master.bind("<Enter>",self.display )
       self.master.bind("<Leave>",self.remove )
Exemple #14
0
 def __init__(self) -> None:
     Menu.__init__(self)
     self.add_command(label='Getting Started', command=callback)
     self.add_separator()
     self.add_command(label='Github Repository',
                      command=repository_redirect)
     self.add_command(label='Report Problem', command=issue_redirect)
     self.add_command(label='Trello', command=trello_redirect)
     self.add_command(label='About', command=callback)
     # disable : Under construction
     self.entryconfig('Getting Started', state='disabled')
     self.entryconfig('About', state='disabled')
Exemple #15
0
 def __init__(self):
     Menu.__init__(self)
     self.game_length = IntVar(None, 10)
     self.add_radiobutton(label="10 words (default)",
                          value=10,
                          variable=self.game_length)
     self.add_radiobutton(label="25 words",
                          value=25,
                          variable=self.game_length)
     self.add_radiobutton(label="50 words",
                          value=50,
                          variable=self.game_length)
 def __init__(self, parent=None, servers={}, clients={}, others={}):
     Menu.__init__(self, parent)
     self.buildMenu = None
     if "compiler" in others:
         self.buildMenu = BuildMenu(
             self, others["compiler"]["compile_enabled_servers"].split(";"))
         self.add_cascade(label="构建", menu=self.buildMenu)
     self.clientsMenu = ClientsControlMenu(self, clients)
     self.serversMenu = ServersControlMenu(self, servers)
     self.otherMenu = OtherControlMenu(self)
     self.add_cascade(label="客户端", menu=self.clientsMenu)
     self.add_cascade(label="服务器", menu=self.serversMenu)
     self.add_cascade(label="其他", menu=self.otherMenu)
Exemple #17
0
 def __init__(self, parent, text, command=None):
     self._com = command
     Menu.__init__(self, parent, tearoff=0)
     if not isinstance(text, str):
         raise TypeError(
             'Trying to initialise a Hover Menu with a non string type: ' +
             text.__class__.__name__)
     toktext = re.split('\n', text)
     for t in toktext:
         self.add_command(label=t)
         self._displayed = False
         self.master.bind("<Enter>", self.Display)
         self.master.bind("<Leave>", self.Remove)
	def __init__(self,root,parent):
		Menu.__init__(self,root,tearoff=0)
		self.parent = parent
		m_bp3 = Menu(self,tearoff=0)
		self.cwd = os.getcwd()
		bp3_fw_dir = join(self.cwd,'modules/fw/3')
		for f in listdir(bp3_fw_dir):
			if not f.endswith('.hex') and not isfile(f):
				continue
			m_bp3.add_command(label=f,command=lambda f=f: self.push_fw(f'3/{f}'))
	
		m_bp4 = Menu(self,tearoff=0)

		self.add_cascade(label='BP 3',menu=m_bp3)
Exemple #19
0
    def __init__(self, parent):

        Menu.__init__(self, parent)

        self.parent = parent

        menu_file = Menu(self, tearoff=0)
        menu_file.add_command(compound='left',
                              image=icons['actions']['new']['generic'], label='New...', command=new_file)
        menu_file.add_command(compound='left',
                              image=icons['actions']['open']['file'], label='Open...', command=open_files)
        menu_file.add_command(compound='left',
                              image=icons['actions']['open']['folder'], label='Open Folder...', command=open_folder)
        menu_file.add_command(compound='left',
                              image=icons['actions']['open']['mc_folder'],
                              label='Open Minecraft Save Folder...', command=open_mc_dir)
        menu_file.add_separator()
        menu_file.add_command(compound='left', image=icons['actions']['save'], label='Save...', command=save_files)
        menu_file.add_command(compound='left', image=icons['actions']['refresh'],
                              label='Refresh', command=refresh_files)
        menu_file.add_separator()
        menu_file.add_command(compound='left', image=icons['actions']['exit'], label='Exit', command=root.quit)

        menu_edit = Menu(self, tearoff=0)
        menu_edit.add_command(compound='left', image=icons['actions']['copy'], label='Copy')
        menu_edit.add_command(compound='left', image=icons['actions']['cut'], label='Cut')
        menu_edit.add_command(compound='left', image=icons['actions']['paste'], label='Paste')
        menu_edit.add_separator()
        menu_edit.add_command(compound='left', image=icons['actions']['rename'], label='Rename')
        menu_edit.add_command(compound='left', image=icons['actions']['edit'], label='Edit')
        menu_edit.add_command(compound='left', image=icons['actions']['delete'], label='Delete')
        menu_edit.add_separator()
        menu_edit.add_command(compound='left', image=icons['actions']['move']['up'], label='Move Up')
        menu_edit.add_command(compound='left', image=icons['actions']['move']['down'], label='Move Down')

        menu_search = Menu(self, tearoff=0)
        menu_search.add_command(compound='left', image=icons['actions']['search'], label='Find')
        menu_search.add_command(compound='left', image=icons['actions']['move']['right'], label='Find Next')
        menu_search.add_separator()
        menu_search.add_command(compound='left', image=icons['actions']['replace'], label='Replace')
        menu_search.add_separator()
        menu_search.add_command(compound='left', image=icons['actions']['chunk_find'], label='Chunk Finder')

        menu_help = Menu(self, tearoff=0)
        menu_help.add_command(compound='left', image=icons['about'], label='About')

        self.add_cascade(label='File', menu=menu_file)
        self.add_cascade(label='Edit', menu=menu_edit)
        self.add_cascade(label='Search', menu=menu_search)
        self.add_cascade(label='Help', menu=menu_help)
Exemple #20
0
 def __init__(self, parent):
     Menu.__init__(self, parent)
     self.parent = parent
     self.newmenu = Menu(self)
     self.showmenu = Menu(self)
     self.newmenu.add_command(label="NPC", command=self.parent.onNew)
     self.newmenu.add_separator()
     self.newmenu.add_command(label="Save", command=self.parent.save)
     self.newmenu.add_command(label="Load", command=self.parent.load)
     self.showmenu.add_command(label="Info", command=self.parent.get_info)
     self.newmenu.add_separator()
     self.showmenu.add_separator()
     self.add_cascade(label="New", menu=self.newmenu)
     self.add_cascade(label="Show", menu=self.showmenu)
     self.add_command(label="Exit", command=self.parent.quit)
Exemple #21
0
 def __init__(self, parent):
     Menu.__init__(self, parent)
     self.parent = parent
     self.newmenu = Menu(self)
     self.showmenu = Menu(self)
     self.newmenu.add_command(label="NPC", command=self.parent.onNew)
     self.newmenu.add_separator()
     self.newmenu.add_command(label="Save", command=self.parent.save)
     self.newmenu.add_command(label="Load", command=self.parent.load)
     self.showmenu.add_command(label="Info", command=self.parent.get_info)
     self.newmenu.add_separator()
     self.showmenu.add_separator()
     self.add_cascade(label="New", menu=self.newmenu)
     self.add_cascade(label="Show", menu=self.showmenu)
     self.add_command(label="Exit", command=self.parent.quit)
Exemple #22
0
    def __init__(self, root=None):
        self.__root = root
        Menu.__init__(self, self.__root)

        # File
        self.__menu_file = Menu(self, tearoff=False)

        # regist env
        self.__menu_file.add_command(label=ADD_ENV_SETUP_SCRIPT_LABEL,
                                     command=self.__regist_env_setup_script)
        # regist script
        self.__menu_file.add_command(label=ADD_DATA_SCRIPT_LABEL,
                                     command=self.__regist_data_script)
        self.__menu_file.add_command(label=ADD_MODEL_SCRIPT_LABEL,
                                     command=self.__regist_model_script)
        self.__menu_file.add_command(label=ADD_TEST_FUNC_LABEL,
                                     command=self.__regist_test_func_script)

        self.__menu_file.add_separator()

        # delete script
        self.__menu_file.add_command(label=DELETE_SCRIPTS,
                                     command=self.__delete_scripts)

        self.__menu_file.add_separator()

        # show env script list
        self.__menu_file.add_command(label=SHOW_ENV_SETUP_M_LABEL,
                                     command=self.__show_env_wizard)

        self.add_cascade(label=FILE, menu=self.__menu_file)

        # Run
        self.__menu_rnu = Menu(self, tearoff=False)

        # Run Verification
        self.__menu_rnu.add_command(label=RUN_TEST_FUNC, command=self.__run)
        # Stop Verification
        self.__menu_rnu.add_command(label=STOP_TEST_FUNC,
                                    command=self.__stop_test_func)
        self.__menu_rnu.entryconfig(1, state=DISABLED)

        self.add_cascade(label=RUN, menu=self.__menu_rnu)

        # self.add_command(label=HELP, command=show_help)

        self.__main_window = self.__root.children['!mainwindow']
        self.__test_select_frame = self.__main_window.test_select_frame
Exemple #23
0
    def __init__(self, master=None):
        Menu.__init__(self)

        self = Menu(master)

        filemenu = Menu(self, tearoff=False)
        filemenu.add_command(label="Open")
        self.add_cascade(menu=filemenu, label="File")

        windowmenu = Menu(self, name="window", tearoff=False)
        self.add_cascade(menu=windowmenu, label="Window")

        helpmenu = Menu(self, name="help", tearoff=False)
        self.add_cascade(menu=helpmenu, label="Help")

        master['menu'] = self
Exemple #24
0
    def __init__(self, controller):
        Menu.__init__(self, controller)

        # File dropdown
        filemenu = Menu(self, tearoff=0)
        filemenu.add_command(label="New rules sheet from template",
                             command=lambda: self.new_rules_sheet(controller))
        filemenu.add_separator()
        filemenu.add_command(label="Quit", command=lambda: self.quit())
        self.add_cascade(label="File", menu=filemenu)

        # Help dropdown
        helpmenu = Menu(self, tearoff=0)
        helpmenu.add_command(label="About", command=self.open_about)
        helpmenu.add_command(label="Tutorial",
                             command=lambda: self.open_tutorial(controller))
        self.add_cascade(label="Help", menu=helpmenu)
Exemple #25
0
 def __init__(self, root):
     self.root = root
     Menu.__init__(self, root, postcommand=self.update_menu)
     m_file = Menu(self, tearoff=0)
     self.add_cascade(label='File', menu=m_file)
     m_file.add_command(label='Open', command=root.editor.open)
     m_file.add_command(label='Save', command=root.editor.save)
     m_file.add_command(label='Save as', command=root.editor.save_as)
     m_file.add_separator()
     self.m_recent = Menu(m_file, tearoff=0)
     m_file.add_cascade(label='Recent', menu=self.m_recent)
     m_file.add_separator()
     m_file.add_command(label='Exit', command=root.close)
     self.add_cascade(label='Run Script (F5)',
                      command=self.root.console.run_script)
     self.m_firmware = FirmwareMenu(self, root)
     self.add_cascade(label='Firmware', menu=self.m_firmware)
     self.add_command(label='About', command=self.root.about)
Exemple #26
0
    def __init__(self, parent, controller):
        self.controller = controller  # Call to do stuff
        Menu.__init__(self, parent)  # Call Menu parent init

        self.file_menu = Menu(self)  # create file menu
        self.file_menu.add_command(
            label="Watch",  # add Watch to file menu
            command=lambda: self.controller('watch'))

        self.file_menu.add_command(
            label="Clear",  # add Clear to clear status
            command=lambda: self.controller('clear'))

        self.file_menu.add_separator()  # have quit on it's own
        self.file_menu.add_command(
            label='Quit',  # add quit to file memu
            command=lambda: self.controller('stop'))
        self.add_cascade(label="File",
                         menu=self.file_menu)  # add file menu to menu
    def __init__(self, root):
        Menu.__init__(self, root)
        self.root = root
        self.root.config(menu=self)

        self.options = Menu(self)
        self.options.add_command(label='Background Color',
                                 command=self.change_background)
        self.options.add_command(label='Text Color', command=self.change_text)
        self.options.add_command(label='Text Box Color',
                                 command=self.change_text_box)
        self.options.add_command(label='Text Box Text Color',
                                 command=self.change_text_box_text)

        self.add_cascade(label='Options', menu=self.options)

        self.help = Menu(self)
        self.help.add_command(label='About ClassPolicy', command=self.about)

        self.add_cascade(label='Help', menu=self.help)
Exemple #28
0
 def __init__(self, window) -> None:
     Menu.__init__(self)
     self.add_command(label='Start', command=window.start)
     self.add_command(label='Restart', command=callback)
     self.add_command(label='Stop', command=callback)
     self.add_separator()
     self.add_command(label='New Set', command=callback)
     self.add_command(label='Import Set Pack', command=import_pack)
     self.add_command(label='Export Set Pack', command=export_pack)
     self.add_separator()
     self.add_command(label='Settings', command=callback)
     self.add_separator()
     self.add_command(label='Exit', command=window.askokcancel)
     # disable : Under construction
     self.entryconfig('Restart', state='disabled')
     self.entryconfig('Stop', state='disabled')
     self.entryconfig('New Set', state='disabled')
     self.entryconfig('Import Set Pack', state='disabled')
     self.entryconfig('Export Set Pack', state='disabled')
     self.entryconfig('Settings', state='disabled')
     return
Exemple #29
0
    def __init__(self, parent):
        Menu.__init__(self)

        apps = Menu(self)
        apps.add_command(label=parent.frames[Preview].__title__,
                         command=lambda: parent.show_frame(Preview))
        apps.add_command(label=parent.frames[Settings].__title__,
                         command=lambda: parent.show_frame(Settings))
        apps.add_command(label=parent.frames[Applications].__title__,
                         command=lambda: parent.show_frame(Applications))
        apps.add_command(label='Exit', command=lambda: parent.close())
        self.add_cascade(label='View', menu=apps)

        text_help = 'Instructions\nlink to website'
        text_about = 'Wadaane, Mohamed\nIsra Abdel Wahab\nSenior Project, 2018'
        info = Menu(self)
        info.add_command(
            label='Help',
            command=lambda: messagebox.showinfo('Help', text_help))
        info.add_command(
            label='About us',
            command=lambda: messagebox.showinfo('About us', text_about))
        self.add_cascade(label='Help', menu=info)
Exemple #30
0
 def __init__(self, master=None):
     Menu.__init__(self, master)
     self._create_menus()
Exemple #31
0
 def __init__(self, parent):
     Menu.__init__(self, parent)
     self.filemenu = FileSubmenu(self)
     self.aboutmenu = AboutSubmenu(self)
     self.add_cascade(label="file", menu=self.filemenu)
     self.add_cascade(label="about", menu=self.aboutmenu)
Exemple #32
0
 def __init__(self, parent,delegate):
        Menu.__init__(self, parent)   
        self.parent = parent
        self.delegate = delegate
        self.initUI()
        self.toggleBooleanButtonStates = []
Exemple #33
0
 def __init__(self, parent,delegate):
        Menu.__init__(self, parent)   
        
        self.delegate = delegate
        self.initUI()
Exemple #34
0
 def __init__(self, data):
     self.master = data
     Menu.__init__(self, self.master, tearoff=0)
     self._create()
     self._create_commands()
Exemple #35
0
 def __init__(self, data, root, textfield):
     self.master = data
     self.textField = textfield
     Menu.__init__(self, self.master, tearoff=0)
     self._create()
     self._create_commands(root)