-
Notifications
You must be signed in to change notification settings - Fork 0
/
edit_data_page.py
31 lines (26 loc) · 1.26 KB
/
edit_data_page.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import tkinter as tk
from tkinter import ttk
from tkinter import font
import matplotlib
matplotlib.use("TkAgg")
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2Tk
from matplotlib.figure import Figure
class edit_data_page(object):
def __init__(self, parent, controller):
tk.Frame.__init__(self,parent)
self.title = tk.title(self, "Edit Values Page")
text = tk.Label(text="Edit Data Page", font=("Times New Roman",14))
text.pack()
heading= font.Font(text, text.cget("font"))
text.configure(underline = True)
heading.configure(font=text)
#save button
##edited info here will be written on the csv, then the button just goes back to the graphing_page
#to be updated
save_button = ttk.Button(self, text="Save changes", command = lambda: controller.show_frame(graphing_page))
#discard button
discard_button = ttk.Button(self, text="Discard", command = lambda: controller.show_frame(graphing_page))
discard_button.pack()
#go and edit the csv yourself because you are adding another axis to the plot
open_csv_button = ttk.Button(self, text="Edit File", command = lambda: controller.open_csv())
open_csv_button.pack()