python Tkinter的一些记录
1. Label里面的文本对齐方式:http://www.hiadmin.org/code/python_tkinter_label
Label(root, text="www.hiadmin.org",bg="red",width=20,height=2, wraplength=80,anchor="w",anchor="w",justify="left").pack()
2. Listbox + Scrollbar
t = Text(root) t.pack() t.insert(1.0,'0123456789')t.insert(END,'jcodeer')t.focus_force()
使用focus_force()来使光标在文本后面
6. 禁止Tk()生成的root改变尺寸: root.resizable(0,0)