0
这是GUI监控我的工作: 的Tkinter比对内框架
我的代码是残酷的,因为我觉得像我黑客在一起,但我希望我的对齐问题有与我设置框架的方式有关,所以我可能只是将你的小细节留给你并发布。如果没有,让我知道,我可以发布更多。
这是我的根:
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)
我想要做的就是按分数/商业新闻/股票行情向左起来反对世界的新闻,并有一次在顶部放在蓝色盒子内,以便盒子横跨整个顶部。
这是额外的(并不重要),但真火起来的时候,我尝试了没有按我的运气,但我希望将股票报价放在该部分的单独列中,以便我可以输入一些条件格式。非常感谢!