New to PyCharm Help

Help Please new to PYCharm, attaching code and not understanding.  Doesn't change button color, font and in general doesn't work.  No error messages, no warnings, nothing…

 

from tkinter import *

# Create the main window
root = Tk()

canvas = Canvas(root, width=400, height=250)
canvas.pack()

topFrame = Frame(root)
topFrame.pack(side=TOP)
bottomFrame = Frame(root)
bottomFrame.pack(side=BOTTOM)

button1 = Button(root, text="One",font="Arial",fg="#00FF00",bg="blue")
button2 = Button(root, text="Two",fg="blue")
button3 = Button(root, text="Three",fg="green")
button4 = Button(root, text="Four",fg="purple")

image = image_names()

button1.pack(side=LEFT)
button2.pack(side=LEFT)
button3.pack(side=LEFT)
button4.pack(side=BOTTOM)

root.mainloop()
 

0

Foreground (fg) color do change. If you want to change the whole button color, use Background (bg) color instead, as for your button1

0

Nope that's not it! Still no warnings, no errors and no color

0

请先登录再写评论。