diff --git a/SDPPython/prototype.py b/SDPPython/prototype.py new file mode 100644 index 0000000..be0a777 --- /dev/null +++ b/SDPPython/prototype.py @@ -0,0 +1,37 @@ +import tkinter as tk +from tkinter import ttk + +def option_selected(event): + print(f"Selected: {dropdown_var.get()}") + +def show_circuit_works(): + display_label.config(text="Circuit works", fg="green") + +def show_circuit_not_work(): + display_label.config(text="Circuit does not work", fg="red") + +root = tk.Tk() +root.title("Circut GUI Prototype") + +# drop-down menu +dropdown_var = tk.StringVar() +dropdown = ttk.Combobox(root, textvariable=dropdown_var) +dropdown['values'] = ('Option 1', 'Option 2', 'Option 3') +dropdown.grid(row=0, column=0, padx=10, pady=10) +dropdown.bind("<>", option_selected) + +# display label +display_label = tk.Label(root, text="", font=("Arial", 14)) +display_label.grid(row=1, column=0, columnspan=3, padx=10, pady=10) + +# buttons +button1 = tk.Button(root, text="Circuit Works", command=show_circuit_works) +button1.grid(row=2, column=0, padx=10) + +button2 = tk.Button(root, text="Circuit Does Not Work", command=show_circuit_not_work) +button2.grid(row=2, column=1, padx=10) + +button3 = tk.Button(root, text="Button 3") +button3.grid(row=2, column=2, padx=10) + +root.mainloop()