1
각 스크롤 막대가있는 두 개의 텍스트 상자를 가져 오려고합니다. 나는이 그러나 때 :python tkinter 스크롤 바 및 텍스트 위젯 문제
from Tkinter import *
root = Tk()
s_start = Scrollbar(root)
t_start = Text(root, width=50, height=10)
t_start.focus_set()
s_start.pack(side=RIGHT, fill=Y)
t_start.pack(side=LEFT, fill=Y)
s_start.config(command=t_start.yview)
t_start.config(yscrollcommand=s_start.set)
s_end = Scrollbar(root)
t_end = Text(root, width=50, height=10)
t_end.focus_set()
s_end.pack(side=RIGHT, fill=Y)
t_end.pack(side=LEFT, fill=Y)
s_end.config(command=t_end.yview)
t_end.config(yscrollcommand=s_end.set)
root.mainloop()
을 발생합니다 : 경우
이 명확하지, 그 오른쪽 텍스트 상자로, 내부 스크롤 기능적으로 결합 된 두 개의 텍스트 상자입니다 왼쪽 텍스트 상자는 기능적으로 바깥 쪽 스크롤 막대에 바인딩됩니다.
적합합니다. 이제 프레임에 테두리와 높이를 어떻게 부여합니까? – JShoe
포장 위치가 고정되었습니다. – odie5533
감사합니다. 그렇다면 비활성 상태에서도 상자에 테두리를 추가 할 수 있습니까? – JShoe