Pārlūkot izejas kodu

'raspberry-pi/gui/mainWindow.py' ändern

pack forget nochmal geändert
Janek Fabian Franz 3 gadi atpakaļ
vecāks
revīzija
e0b08dd2f8
1 mainītis faili ar 10 papildinājumiem un 9 dzēšanām
  1. 10 9
      raspberry-pi/gui/mainWindow.py

+ 10 - 9
raspberry-pi/gui/mainWindow.py

@@ -61,18 +61,19 @@ class MainWindow(tk.Frame):
 
     quit_button = tk.Button(self.controls, text="Quit", command=self.root.destroy, height=2, foreground="red")
     quit_button.pack(side="bottom", fill="both")
-    quit_button.pack_forget()
+    quit_button.forget_pack()
 
     calibrate_button = tk.Button(self.controls, text="Calibrate AC", command=self.calibrate_ac, height=4)
-    calibrate_button.pack_forget(side="bottom", fill="both")
+    calibrate_button.pack(side="bottom", fill="both")
+    calibrate_button.foreget_pack()
 
     clear_button = tk.Button(self.controls, text="Clear graph", command=self.graph.clear, height=4)
     clear_button.pack(side="bottom", fill="both")
-    clear_button.pack_forget()
+    clear_button.forget_pack()
 
     logscreen_button = tk.Button(self.controls, text="Log", command=self.open_log, height=4)
     logscreen_button.pack(side="bottom", fill="both")
-    logscren_button.pack_forget()
+    logscren_button.forget_pack()
 
   def update(self):
     if not self.root.winfo_exists():
@@ -192,8 +193,8 @@ class MainWindow(tk.Frame):
 
   def goback(self):
     self.menu_button.pack(side="bottom", fill="both") 
-    self.quit_button.pack_forget()
-    self.calibrate_button.pack_forget()
-    self.clear_button.pack_forget()
-    self.logScreen_button.pack_forget()
-    self.goback_button.pack_forget()
+    self.quit_button.forget_pack()
+    self.calibrate_button.forget_pack()
+    self.clear_button.forget_pack()
+    self.logScreen_button.forget_pack()
+    self.goback_button.forget_pack()