aio.py 将canvas设定到tabview下,并将高度减小到600,将曲线选择的OP设定为不可伸缩
This commit is contained in:
parent
9088b90e34
commit
5ab03d23f2
Binary file not shown.
Binary file not shown.
@ -185,7 +185,7 @@ class App(customtkinter.CTk):
|
||||
widgits_da[widgit]['entry'] = customtkinter.CTkEntry(self.tabview.tab('Durable Action'), width=670, placeholder_text=widgits_da[widgit]['text'], font=self.my_font)
|
||||
widgits_da[widgit]['entry'].grid(row=widgits_da[widgit]['row'], column=widgits_da[widgit]['col']+1, columnspan=11, padx=(5, 10), pady=10, sticky='we')
|
||||
elif widgit in ['curvesel']:
|
||||
widgits_da[widgit]['optionmenu'] = customtkinter.CTkOptionMenu(self.tabview.tab('Durable Action'), button_color='#708090', fg_color='#778899', values=["device_servo_trq_feedback", "hw_joint_vel_feedback"], font=self.my_font)
|
||||
widgits_da[widgit]['optionmenu'] = customtkinter.CTkOptionMenu(self.tabview.tab('Durable Action'), dynamic_resizing=False, button_color='#708090', fg_color='#778899', values=["device_servo_trq_feedback", "hw_joint_vel_feedback"], font=self.my_font)
|
||||
widgits_da[widgit]['optionmenu'].grid(row=widgits_da[widgit]['row'], column=widgits_da[widgit]['col'], padx=5, pady=10, sticky='we')
|
||||
widgits_da[widgit]['optionmenu'].set(widgits_da[widgit]['text'])
|
||||
# For durable_action tab END =====================================================================
|
||||
@ -207,9 +207,9 @@ class App(customtkinter.CTk):
|
||||
# functions below ↓ ----------------------------------------------------------------------------------------
|
||||
|
||||
def create_canvas(self, figure):
|
||||
self.canvas = FigureCanvasTkAgg(figure, self)
|
||||
self.canvas = FigureCanvasTkAgg(figure, self.tabview.tab('Durable Action'))
|
||||
self.canvas.draw()
|
||||
self.canvas.get_tk_widget().configure(height=640)
|
||||
self.canvas.get_tk_widget().configure(height=600)
|
||||
self.canvas.get_tk_widget().grid(row=3, column=1, rowspan=3, columnspan=13, padx=20, pady=10, sticky="nsew")
|
||||
|
||||
def create_plot(self):
|
||||
@ -309,7 +309,6 @@ class App(customtkinter.CTk):
|
||||
|
||||
def tabview_click(self):
|
||||
self.initialization()
|
||||
|
||||
tab_name = self.tabview.get()
|
||||
if tab_name == 'Data Process':
|
||||
self.flg = 0
|
||||
@ -323,10 +322,6 @@ class App(customtkinter.CTk):
|
||||
|
||||
def initialization(self):
|
||||
tab_name = self.tabview.get()
|
||||
try:
|
||||
self.canvas.get_tk_widget().grid_forget()
|
||||
except:
|
||||
pass
|
||||
self.textbox.delete(index1='1.0', index2='end')
|
||||
if tab_name == 'Data Process':
|
||||
for widgit in widgits_dp:
|
||||
|
Reference in New Issue
Block a user