Re: [Tkinter-discuss] Buttons: Order of execution

2018-02-04 Thread Bhaskar Chaudhary
Hi

Add this line

self.greenButton.update_idletasks()

immediately after

self.greenButton.configure(text="Loading",state="disabled", background="green")

Does this give you the expected behavior ?

If yes, you need to read up on Event processing in Tkinter.

Here's a good article that explains it:

http://wiki.tcl.tk/1527

regards
Bhaskar




On 2/3/18, John Sampson via Tkinter-discuss  wrote:
> I have a method in in which I have the line:
>
> self.greenButton.configure(text="Loading",state="disabled",
> background="green")
>
> followed by other lines.
>
> Being a complete newbie, I would expect the green button to start
> showing the text "Loading" before execution of the lines following the
> abovementioned line.
>
> But it does so immediately afterwards.
>
> I am not looking for a direct solution, but this shows that I do not
> understand how to write tkinter code involving buttons. Is there a
> simple explanation how to
>
> go about writing code so as to make things happen, either at all, or
> when I want them to happen?
>
> Regards
>
> John Sampson
>
> ___
> Tkinter-discuss mailing list
> Tkinter-discuss@python.org
> https://mail.python.org/mailman/listinfo/tkinter-discuss
>
___
Tkinter-discuss mailing list
Tkinter-discuss@python.org
https://mail.python.org/mailman/listinfo/tkinter-discuss


[Tkinter-discuss] Buttons: Order of execution

2018-02-04 Thread John Sampson via Tkinter-discuss

I have a method in in which I have the line:

self.greenButton.configure(text="Loading",state="disabled", 
background="green")


followed by other lines.

Being a complete newbie, I would expect the green button to start 
showing the text "Loading" before execution of the lines following the 
abovementioned line.


But it does so immediately afterwards.

I am not looking for a direct solution, but this shows that I do not 
understand how to write tkinter code involving buttons. Is there a 
simple explanation how to


go about writing code so as to make things happen, either at all, or 
when I want them to happen?


Regards

John Sampson

___
Tkinter-discuss mailing list
Tkinter-discuss@python.org
https://mail.python.org/mailman/listinfo/tkinter-discuss