Answers for "python frame in a frame"

-1

date and time using tkinter

w = Label(root, text=f"{dt.datetime.now():%a, %b %d %Y}", fg="white", bg="black", font=("helvetica", 40))
Posted by: Guest on June-20-2020
1

python frame in a frame

import Tkinter
tk = Tkinter.Tk()
frame1 = Tkinter.Frame(tk, height = 100, width = 100, bg = "WHITE", borderwidth=2)
frame2 = Tkinter.Frame(frame1, height = 100, width = 100, bg = "RED", borderwidth=2)
frame1.pack()
frame2.pack()
label = Tkinter.Label(frame2, text = "Label") #Receive a callback from button here
label.pack()
button = Tkinter.Button(frame1,text="Button") #Send some action to Label here
button.pack()
tk.mainloop()
Posted by: Guest on May-01-2021

Python Answers by Framework

Browse Popular Code Answers by Language