Python Forum
Button animation is not working in a branch
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Button animation is not working in a branch
#1
Hi,

I am using a button animation that changes the relief to sunken on button click and changes it back to raised after 200 milliseconds. The button animation does not work if the if condition is false. It is not clear to me how the two are related. The code can be seen below.

def aonclick():    
    guistyle.configure("SunkableButtonA.TButton", relief="sunken", state="active")
    a.after(200, lambda: guistyle.configure("SunkableButtonA.TButton", relief="raised", state="normal"))
    print(akeyvar.get())
    try:
        #tweepy code
        
        
        if (condition!=true  ):
            
            
            messagebox.showinfo(message="Please provide correct input.")
            
            
            return
        
        #tweepy code
        
    except tweepy.TweepError as e:
        
        messagebox.showinfo(message=e)
Version information: python 3.4.3

I appreciate the cooperation of forum members.
Reply


Messages In This Thread
Button animation is not working in a branch - by mgtheboss - Jan-14-2018, 01:21 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [PyQt] Button clicked not working catlessness 10 8,343 Oct-21-2021, 12:36 PM
Last Post: catlessness
  Closing window on button click not working kenwatts275 4 3,841 May-03-2020, 01:59 PM
Last Post: deanhystad
  [PySimpleGui] How to alter mouse click button of a standard submit button? skyerosebud 3 5,063 Jul-21-2019, 06:02 PM
Last Post: FullOfHelp

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020