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)
我想要做的就是按分數/商業新聞/股票行情向左起來反對世界的新聞,並有一次在頂部放在藍色盒子內,以便盒子橫跨整個頂部。
這是額外的(並不重要),但真火起來的時候,我嘗試了沒有按我的運氣,但我希望將股票報價放在該部分的單獨列中,以便我可以輸入一些條件格式。非常感謝!