昨天不小心少寫一個方法了,等等會去做修正
然後今天偷懶一點,明天再努力加油(X
首先先把昨天的按鈕再做好一點,讓他有個disable狀態
def set_range(self):
self.q_gui_rsp.put("set_range")
self.button_set_range.config(text="setting")
self.button_set_range['state'] = 'disable'
pass
def set_range_result(self, x1, y1, x2, y2):
self.context_range_start.config(text = str(x1)+","+str(y1))
self.context_range_end.config(text = str(x2)+","+str(y2))
self.button_set_range.config(text="set range")
self.button_set_range['state'] = 'normal'
再來新增一個Cross_detect按鈕
self.button_cross_detect = Button(text="cross detect", font=("Arial", 14, "bold"), padx=5, pady=5, bg="blue", fg="light green", command=self.cross_detect)
self.button_cross_detect.pack()
def cross_detect(self):
self.q_gui_rsp.put("cross_detect")
self.button_cross_detect['text'] = 'detecting'
self.button_cross_detect['state'] = 'disable'
def cross_detect_finish(self):
self.button_cross_detect['text'] = 'cross_detect'
self.button_cross_detect['state'] = 'normal'
好的我們明天見(X