change relief example


/ Published in: Python
Save to your folder(s)



Copy this code and paste it in your HTML
  1. from Tkinter import *
  2.  
  3. class GUI(Frame):
  4. def __init__(self):
  5. Frame.__init__(self)
  6. button = Button(relief=RAISED,text='Test Button')
  7. button.pack()
  8. button.bind("<Button-1>",self.changeRelief)
  9.  
  10. def changeRelief(self,event):
  11. event.widget.config(relief=SUNKEN)
  12.  
  13.  
  14. myGUI = GUI()
  15. myGUI.mainloop()

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.