Next Tray 19.1
This commit is contained in:
1 parent
bbe2cfb571
commit
b998fbdbf5
9 files changed
+262
-50
No files matched your search
@@ -0,0 +1,61 @@
|
||||
import tkinter as tk
|
||||
from tkinter import Menu
|
||||
from tkinter.filedialog import askopenfilename
|
||||
|
||||
def open_database():
|
||||
# tk().withdraw()
|
||||
filename = askopenfilename()
|
||||
print(filename)
|
||||
# print("Open Database selected")
|
||||
|
||||
def reload():
|
||||
print("Reload selected")
|
||||
|
||||
def quit_app():
|
||||
root.quit()
|
||||
|
||||
def start_questions():
|
||||
print("Start selected")
|
||||
|
||||
def stop_questions():
|
||||
print("Stop selected")
|
||||
|
||||
def new_questions():
|
||||
print("New Questions selected")
|
||||
|
||||
def edit_questions():
|
||||
print("Edit Questions selected")
|
||||
|
||||
def about():
|
||||
print("About selected")
|
||||
|
||||
root = tk.Tk()
|
||||
root.title("Python Karteikarten Quiz")
|
||||
root.geometry('640x480+300+300')
|
||||
root.resizable(False, False)
|
||||
|
||||
menubar = Menu(root)
|
||||
|
||||
# File menu
|
||||
filemenu = Menu(menubar, tearoff=0)
|
||||
filemenu.add_command(label="Open Database", command=open_database)
|
||||
filemenu.add_command(label="Reload", command=reload)
|
||||
filemenu.add_separator()
|
||||
filemenu.add_command(label="Quit", command=quit_app)
|
||||
menubar.add_cascade(label="File", menu=filemenu)
|
||||
|
||||
# Questions menu
|
||||
questionsmenu = Menu(menubar, tearoff=0)
|
||||
questionsmenu.add_command(label="Start", command=start_questions)
|
||||
questionsmenu.add_command(label="Stop", command=stop_questions)
|
||||
questionsmenu.add_separator()
|
||||
questionsmenu.add_command(label="New Questions", command=new_questions)
|
||||
questionsmenu.add_command(label="Edit Questions", command=edit_questions)
|
||||
menubar.add_cascade(label="Questions", menu=questionsmenu)
|
||||
|
||||
# About menu
|
||||
aboutmenu = Menu(menubar, tearoff=0)
|
||||
aboutmenu.add_command(label="About", command=about)
|
||||
menubar.add_cascade(label="About", menu=aboutmenu)
|
||||
|
||||
root.config(menu=menubar)
|
||||
Reference in new issue
Block a user