Reputation: 633
Is there a way to visibly indicate that an Entry is disabled? The only thing that happens when you disable an entry is that you cannot click on it anymore, but its appearance doesn't change.
I tried to change the background to a darker one but it doesn't change if the entry is disabled.
def blockentry(evento):
if self.addVotoFrameEntry2["state"] == NORMAL:
self.addVotoFrameEntry2["state"] = DISABLED
elif self.addVotoFrameEntry2["state"] == DISABLED:
self.addVotoFrameEntry2["state"] = NORMAL
self.addVotoFrameCheck = Checkbutton(self.addVotoFrame, text="Oggi", font=("Helvetica 11"), variable=var)
self.addVotoFrameCheck.pack(anchor=SW)
self.addVotoFrameCheck.bind("<Button-1>", blockentry)
self.addVotoFrameEntry2 = Entry(self.addVotoFrame, width=10)
self.addVotoFrameEntry2.pack(pady=(0, 10))
Upvotes: 2
Views: 228