문제

I ran into a problem that occurs when using the module PanedWindow Tix.
Let's start with the fact that the sample for Tkinter directly Tix does not work, although other examples have been successfully transferred to the replacement from Tkinter to Tix.
If you change it so that he earned.

import Tix

r=Tix.Tk()
p=Tix.PanedWindow(r,orientation='horizontal')

f1=p.add('f1')
l1=Tix.Listbox(f1)
l1.pack(side=Tix.LEFT, expand=Tix.YES, fill=Tix.BOTH)

f2=p.add('f2')
l2=Tix.Listbox(f2)
l2.pack(side=Tix.LEFT, expand=Tix.YES, fill=Tix.BOTH)

p.pack(side=Tix.LEFT, expand=Tix.YES, fill=Tix.BOTH)
r.mainloop()

it works, but in the strip between the elements of a strange artifact appears as a square.
I would like to remove it

도움이 되었습니까?

해결책

It seems the lesser evil, in this case to use Tix, and to use the Tkinter PanedWindow

import Tkinter,Tix

r=Tix.Tk()
p=Tkinter.PanedWindow(r)

f1=Tix.Frame(p)
l1=Tix.Listbox(f1)
l1.pack(side=Tix.LEFT, expand=Tix.YES, fill=Tix.BOTH)
p.add(f1)

f2=Tix.Frame(p)
l2=Tix.Listbox(f2)
l2.pack(side=Tix.LEFT, expand=Tix.YES, fill=Tix.BOTH)
p.add(f2)

p.pack(side=Tix.LEFT, expand=Tix.YES, fill=Tix.BOTH)
r.mainloop()
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top