How to make a button flashing?

Terry Reedy tjreedy at udel.edu
Thu Jun 14 01:57:11 EDT 2018


On 6/13/2018 8:57 PM, huey.y.jiang at gmail.com wrote:
> On Wednesday, June 13, 2018 at 5:23:17 PM UTC+8, huey.y... at gmail.com wrote:
>> Hi All,
>>
>> I forgot the syntax of making a button flash, and failed to find an example in the web. I use Tkinter, to create a button. Then made it packed, and showed up. Now I am trying to make button b flashing, to make it get better noticed. I checked the docs, and found a method flash() is available, then I tried:
>>
>> b.flash()
>>
>> there was no error message popped out, but there was nothing happened also. I wonder who can give me this help? Thanks!
>>
>> Huey
> 
> Thanks, Terry, it works!

I try to always test code before posting ;-).

With different code, you could switch state every 1/2 second or so, like 
a flashing red traffic light.  You might try to do that.

-- 
Terry Jan Reedy




More information about the Python-list mailing list