textFrame1 = Frame(mainFrame,bd=5,width=100)
textFrame1.pack(fill=BOTH,side=LEFT,expand=YES)
self.textFile1 = Text(textFrame1,wrap=None)
sbVer1 = Scrollbar(textFrame1,orient=VERTICAL,command=self.textFile1.yview)
sbHor1 = Scrollbar(textFrame1,orient=HORIZONTAL,command=self.textFile1.xview)
sbVer1.pack(side=RIGHT,fill=Y)
sbHor1.pack(side=BOTTOM,fill=X)
self.textFile1.config(yscrollcommand=sbVer1.set,xscrollcommand=sbHor1.set)
self.textFile1.pack()
# --------------------------------------------
textFrame2 = Frame(mainFrame,bd=5,width=1)
textFrame2.pack(fill=BOTH,side=RIGHT,expand=YES)
self.textFile2 = Text(textFrame2,wrap=None)
sbVer2 = Scrollbar(textFrame2,orient=VERTICAL,command=self.textFile2.yview)
sbHor2 = Scrollbar(textFrame2,orient=HORIZONTAL,command=self.textFile2.xview)
sbVer2.pack(side=RIGHT,fill=Y)
sbHor2.pack(side=BOTTOM,fill=X)
self.textFile2.config(yscrollcommand=sbVer2.set,xscrollcommand=sbHor2.set)
self.textFile2.pack()
I want to resize a frame (tkinter python) because it's too large and I want to make it smaller. If you read carefully, I put two frames in this code. The first frame has width=100 and the second width=1. But, when I compile, the result still same. It looks as if the command width doesn't work correctly.