python - Tkinter: Tracing the state of a widget -


i aware possible trace changes of, say, entered value in entry widget using e.g. stringvar , variable observer trace. possible trace state of widget? let's have code:

from tkinter import *  class my_window:      def __init__(self, root):          self.button1 = button(root, text="enter", command = self.disable_entrybox)         self.get_info_box1 = entry(root)         self.button2 = button(root, text="enter", command = self.disable_entrybox)          self.get_info_box2 = entry(root)         self.button1.pack()         self.get_info_box1.pack()         self.button2.pack()         self.get_info_box2.pack()         self.get_info_box2.config(state="disable")      def disable_entrybox(self):         x = self.get_info_box1.get()         self.get_info_box1.config(state="disable")   root = tk() my_window = my_window(root) root.mainloop() 

and want trace if get_info_box1is disabled or not, , if it's disabled, change state of get_info_box2 "normal". there way this?


Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -