|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
本帖最后由 1404461012 于 2020-5-24 14:45 编辑
这是一个页面,但f3_3的框架无法显示(我指定他的颜色为黑,来查看他是否显示了),f3_3框架本应显示在左边的空白区域,应该如何做?
- from tkinter import *
- root = Tk()
- f3_str = StringVar()
- f3_str.set('sdafd')
- frame3 = Frame(root,height = 400, width = 600)
- frame3.propagate(0)
- frame3.pack()
- f3_1 = Frame(frame3,height = 280, width = 70,bg = 'black')
- f3_1.propagate(0)
- f3_1.pack(padx = 0, pady = 20, anchor = 'ne')
- f3_2 = Frame(frame3, height = 100, width = 70)
- f3_2.pack(padx = 0, pady = 10, anchor = 'se')
- f3_2.propagate(0)
- pre = Button(f3_1, text = '上一页')
- pre.pack(padx = 10, pady = 10, anchor = 'nw')
- nt = Button(f3_1, text = '下一页', anchor = 'nw')
- nt.pack(padx = 10, pady = 10, anchor = 'nw')
- download_ok = Button(f3_2, text = '下载')
- download_ok.pack(padx = 10, pady = 10, anchor = 'sw')
- f3_3 = Frame(frame3, height = 400, width = 500,bg = 'black')
- f3_3.propagate(0)
- f3_3.pack(padx = 10, pady = 10, anchor = 'nw')
- textlabel = Label(f3_3, textvariable = f3_str, fg = 'green')
- textlabel.pack(anchor = 'n',pady = 5)
- mainloop()
复制代码 |
|