我的代码是残暴的,因为我觉得我是在一起破解它,但我希望我的对齐问题与我设置框架的方式有关,所以可能我可以省去你的小细节,并张贴出来。如果没有,让我知道,我可以张贴更多。在
这就是我的根:
weather_root = Frame(root, bg = 'orange').grid(row = 0, column = 0,sticky = NW)
forecast_root = Frame(weather_root, bg = 'blue')
forecast_root.grid(row = 0, column =1, rowspan = 8, sticky = NSEW)
time_root = Frame(forecast_root, bg = 'red')
time_root.grid(row = 0, column = 7,sticky = NE)
commute_root = Frame(time_root)
commute_root.grid(column = 0)
quote_root = Frame(forecast_root, bg = 'yellow')
quote_root.grid(column = 0, columnspan = 8, rowspan = 4,sticky = 'S')
#I have these spanning columns to get in the description of the article
news_root = Frame(root, bg = 'green')
news_root.grid(row = 8, column = 0, columnspan = 5, sticky = W)
sport_root = Frame(root, bg = 'purple')
sport_root.grid(column = 0, columnspan = 4,sticky = W)
scores_root = Frame(root, bg = 'indianred')
scores_root.grid(row = 8, column = 7, sticky = N)
football_root = Frame(scores_root, bg = 'orange')
football_root.grid(column = 0)
business_root = Frame(football_root, bg = 'yellow')
business_root.grid(column = 0)
# This color doesn't seem to be getting picked up
stocks_root = Frame(business_root, bg = 'black')
stocks_root.grid(column = 0)
我想做的是把分数/商业新闻/股票报价推到左边,对照世界新闻,把最上面的时间放在蓝色的盒子里,这样盒子就跨越了整个顶部。在
这是额外的(不重要),但当我尝试的时候真的搞砸了,所以没有按我的运气,但我希望股票报价在该部分的单独列中,这样我可以放入一些条件格式。非常感谢!在
在顶部和底部使用额外的框架,然后将框架放在它们内部所需的位置。在
相关问题 更多 >
编程相关推荐