?
=?ISO-8859-1?Q?J=F8rgen_Hansen?=
Hi
I have a problem with a Listbox in Tkinter. When I tab through several
widgets with the tab-key, the listbox looses its selection, even
though it has been selected with .selection_set. The example below
demonstrates this. Can anyone provide me with some help on this?
Regards
Jorgen
Ps. I'm on a W2K machine with Python 2.2.2
----
from Tkinter import *
root = Tk()
colors = ['Yellow', 'Black', 'White', 'Green']
lb = Listbox(root)
for color in colors:
lb.insert(END, color)
lb.selection_set(0)
lb.pack()
Entry(root).pack()
root.mainloop()
----
I have a problem with a Listbox in Tkinter. When I tab through several
widgets with the tab-key, the listbox looses its selection, even
though it has been selected with .selection_set. The example below
demonstrates this. Can anyone provide me with some help on this?
Regards
Jorgen
Ps. I'm on a W2K machine with Python 2.2.2
----
from Tkinter import *
root = Tk()
colors = ['Yellow', 'Black', 'White', 'Green']
lb = Listbox(root)
for color in colors:
lb.insert(END, color)
lb.selection_set(0)
lb.pack()
Entry(root).pack()
root.mainloop()
----