Question

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

Was it helpful?

Solution

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()
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top