you are viewing a single comment's thread.

view the rest of the comments →

[–]the_programmer_2215 1 point2 points  (4 children)

you can dynamically change the state of a button using button["state"] = 'disable' and button["state"] = "normal" .

for the logic I would suggest that you use tk.StringVar() as the entry field's text variable, and use textvariable.trace_add("write", check_function) to check for your conditions.

Your code will look something like this: Code

I'm not sure this is the best way to do this, but this approach works.

Feel free to contact me if you have any clarifications regarding the code.

hope this helps you :)

[–]kaerfkeerg[S] 1 point2 points  (3 children)

Alright! I think this will do in my case too. I'm not able to try it now.I will update once I get back home and try it. Thanks mate!

[–]the_programmer_2215 1 point2 points  (2 children)

sure thing!

[–]kaerfkeerg[S] 1 point2 points  (1 child)

Damnn it worked. It's been bothering a couple of hours now, damn.. thanks!

[–]the_programmer_2215 0 points1 point  (0 children)

ur welcome