Set button background : Button : Tkinker PYTHON TUTORIALS


PYTHON TUTORIALS » Tkinker » Button »

 

Set button background


Set button background
from Tkinter import *

class MyApp:                        
  def __init__(self, myParent):
    self.myContainer1 = Frame(myParent)
    self.myContainer1.pack()
    
    self.button1 = Button(self.myContainer1
    self.button1["text"]"Hello, World!"     
    self.button1["background""green"      
    self.button1.pack()                         
    
root = Tk()
myapp = MyApp(root
root.mainloop()



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo Tkinker
» Button