Files
@ 630c42e6d376
Branch filter:
Location: OneEye/src/gui/menu.py - annotation
630c42e6d376
608 B
text/x-python
requirements.txt
5f2136fcbebd bc96e653888e 5f2136fcbebd 5f2136fcbebd bc96e653888e bc96e653888e 5f2136fcbebd 5f2136fcbebd 5f2136fcbebd 5f2136fcbebd 5f2136fcbebd 5f2136fcbebd 5f2136fcbebd 5f2136fcbebd bc96e653888e 5f2136fcbebd 5f2136fcbebd 5f2136fcbebd 5f2136fcbebd 5f2136fcbebd 5f2136fcbebd bc96e653888e 5f2136fcbebd 5f2136fcbebd 5f2136fcbebd 5f2136fcbebd 5f2136fcbebd 5f2136fcbebd | import tkinter as tk
from .util import MsgMixin
from .settings import Settings
class MainMenu(MsgMixin):
def __init__(self,parent,root):
self.root=root
self.parent=parent
self._createWidgets()
def _createWidgets(self):
bar=self._createTopBar()
file = tk.Menu(bar)
help_ = tk.Menu(bar)
bar.add_cascade(menu=file, label='File')
bar.add_cascade(menu=help_, label='Help')
file.add_command(label="Settings",command=lambda: Settings(self.parent))
help_.add_command(label="About")
def _createTopBar(self):
menubar = tk.Menu(self.root)
self.root['menu'] = menubar
return menubar
|