这三条线:
Clockframe = Frame(root, height=520, width=960)
Tempframe = Frame(root, height=520, width=960)
Bottomframe = Frame(root, height=520, width=1920)
结合这三条线:
Clockframe.grid(row=0, column=0)
Tempframe.grid(row=0, column=1)
Bottomframe.grid(row=1, columnspan=1)
给我以下结果:
我的目标是:
columnspan=1
表示Bottomframe
跨越单个列。由于这将Bottomframe
与第一列中的Clockframe
对齐,因此第一列扩展为宽度1920。这将第二列推过第1920个像素并(可能)离开屏幕。您可以通过减小Bottomframe
的宽度来确认这一点,您将看到Tempframe
逐渐进入视图因此,将
columnspan=1
更改为columnspan=2
,使Bottomframe
跨越前两列。比如说,相关问题 更多 >
编程相关推荐