aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugeniy E. Mikhailov <evgmik@gmail.com>2021-04-03 23:45:06 -0400
committerEugeniy E. Mikhailov <evgmik@gmail.com>2021-04-03 23:45:06 -0400
commitfb9940ed954256ba159f00e1705b42bc66f28e60 (patch)
tree404447ebd67e33a594d652b6c76005b362544329
parenteb0225ebbca7e980d26e8bf29f204bea73e7c908 (diff)
downloadpyExpControl-fb9940ed954256ba159f00e1705b42bc66f28e60.tar.gz
pyExpControl-fb9940ed954256ba159f00e1705b42bc66f28e60.zip
better looking gui
-rw-r--r--panel.py27
1 files changed, 16 insertions, 11 deletions
diff --git a/panel.py b/panel.py
index 921bb1f..04afc9f 100644
--- a/panel.py
+++ b/panel.py
@@ -166,18 +166,23 @@ class Experiment:
self.hardware['LabJack'] = ue9qol.UE9qol()
def guiSetup(self, root):
+ self.cntrlPannel=ttk.LabelFrame(root, text='controls')
+ self.cntrlPannel.pack()
- self.bRestart=Button(root,text="RESTART",command=self.restart,font=('Arial','24'))
- self.bRestart.pack()
+ self.bRestart=Button(self.cntrlPannel,text="RESTART",command=self.restart,font=('Arial','24'))
+ self.bRestart.pack(side='left')
- self.bStart=Button(root,text="START",command=self.start,font=('Arial','24'))
- self.bStart.pack()
+ self.bStart=Button(self.cntrlPannel,text="START",command=self.start,font=('Arial','24'))
+ self.bStart.pack(side='left')
- self.bStop=Button(root,text="STOP",command=self.stop,font=('Arial','24'))
- self.bStop.pack()
+ self.bStop=Button(self.cntrlPannel,text="STOP",command=self.stop,font=('Arial','24'))
+ self.bStop.pack(side='left')
- self.bExit=Button(root,text="EXIT",command=exit,font=('Arial','24'))
- self.bExit.pack()
+ self.bExit=Button(self.cntrlPannel,text="EXIT",command=exit,font=('Arial','24'))
+ self.bExit.pack(side='left')
+
+ self.dataDisplay=ttk.LabelFrame(root, text='data')
+ self.dataDisplay.pack()
self.fig=plt.figure()
@@ -186,14 +191,14 @@ class Experiment:
# self.ax.set_ylim([0,20])
# self.ax.plot([i for i in range(10)],[i for i in range(10)])
- self.canvas = FigureCanvasTkAgg(self.fig, master = root)
+ self.canvas = FigureCanvasTkAgg(self.fig, master = self.dataDisplay)
self.canvas.draw()
# placing the canvas on the Tkinter window
- self.canvas.get_tk_widget().pack()
+ # self.canvas.get_tk_widget().pack()
# creating the Matplotlib toolbar
- self.toolbar = NavigationToolbar2Tk(self.canvas, root)
+ self.toolbar = NavigationToolbar2Tk(self.canvas, self.dataDisplay)
self.toolbar.update()
# placing the toolbar on the Tkinter window