from tkinter import * # Create window root=Tk() # Window title root.title("Window Demo") # Adjust window size according widget root.propagate(1) # Window background color root.configure(background='silver') ''' fg - foreground color - text color bg background color ''' # Crete Label objects lblgm=Label(root,text="Good Evening",fg='green',bg='silver',font="Arial 25 bold") lbleve=Label(root,text="Good Morning",fg='red',bg='silver',font="Tahoma 15 bold") # Include label objects in window lblgm.pack() lbleve.pack() root.mainloop()
Output
You must be logged in to post a comment.