
September 11th, 2002, 10:48 AM
|
|
Junior Member
|
|
Join Date: Sep 2002
Posts: 0
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
Tkinter Listbox problems
I'm fairly new to Tkinter and GUI programming in Python (and Python in general, I'm trying to learn it...). The problem I am having right now is I am trying to have a functions set the selected item in a Tk.Listbox. The idea being a user can hit <up> or <down> and scroll up and down my listbox (from anywhere in the window, not just when the listbox has focus). I figured it would be the Listbox.select_set or Listbox.select_anchor methods, but neither seem to work. Below is a small snippet of my code:
filesListbox.select_set(1)
filesListbox.select_anchor(1)
filesListbox.select_includes(1)
print filesListbox.curselection()
the last line, the print, just prints an empty tuple... any ideas?
Thanks for the help
Matthew Bonig
|