基本上我想在屏幕的一侧放置一个时钟,在另一侧放置文本,我使用框架。我怎样才能做到这一点。这是它现在的样子的图片:
我想让时钟与同一行上的文本一致,但有不同的标签。看看我的代码,看看你是否能以某种方式帮助我,拜托!
from tkinter import *
from tkinter import ttk
import time
root = Tk()
root.state("zoomed") #to make it full screen
root.title("Vehicle Window Fitting - Management System")
root.configure(bg="grey80")
Title = Frame(root, width=675, height=50, bd=4, relief="ridge")
Title.pack(side=TOP, anchor='w')
titleLabel = Label(Title, font=('arial', 12, 'bold'), text="Vehicle Window Fitting - Management System", bd=5, anchor='w')
titleLabel.grid(row=0, column=0)
clockFrame = Frame(root, width=675, height=50, bd=4, relief="ridge")
clockFrame.pack(side=TOP, anchor='e')
clockLabel = Label(clockFrame, font=('arial', 12, 'bold'), bd=5, anchor='e')
clockLabel.grid(row=0, column=1)
curtime = ""
def tick():
global curtime
newtime …Run Code Online (Sandbox Code Playgroud)