side= Specifies which side to pack the widget against. To pack widgets
vertically, use TOP (default). To pack widgets horizontally, use LEFT.
You can also pack widgets along the BOTTOM and RIGHT edges. You can
mix sides in a single geometry manager, but the results may not always
be what you expect. While you can create pretty complicated layouts by
nesting Frame widgets, you may prefer using the grid geometry manager
for non-trivial layouts.
From a website I found:
所以对于你的代码,我会尝试:
即使您将
TOP
用于两者,它们也会按照您放置它们的顺序堆叠,因此date
会放在日期的顶部,然后clock
会放在日期的底部。你知道吗编辑:另一个例子可以找到here
我认为你现在的问题是使用多帧。试试这个:
所以我发现了问题。由于不注意,我没有注意到问题不在包装或侧面。这是因为我用日期作为时钟变量,用时间作为日期变量。你知道吗
我用的是: 日期2=时间.strftime(“%I:%S%p”) 时间2=时间.strftime(“%A,%B%d%Y”) 而不是: 时间2=时间.strftime(“%I:%S%p”) 日期2=时间.strftime(“%A,%B%d%Y”)
不过,我很感谢大家的帮助!你知道吗
相关问题 更多 >
编程相关推荐