diff --git a/main.py b/main.py new file mode 100644 index 0000000..37a621d --- /dev/null +++ b/main.py @@ -0,0 +1,70 @@ +############################################################################################# +## +## Python Karteikarten Quiz Script +## +## by H4nSolo (Christian Bergs) +## +## Version 1.0 Alpha +## +############################################################################################# + +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("Dropdown Menüleiste Beispiel") + +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) +root.mainloop() \ No newline at end of file diff --git a/scripts/mainframe.py b/scripts/mainframe.py new file mode 100644 index 0000000..ab547ee --- /dev/null +++ b/scripts/mainframe.py @@ -0,0 +1,3 @@ +class mainframe(): + def __init__(self): + pass \ No newline at end of file