Tkinter listbox selection handling
Anton Vredegoor
anton at vredegoor.doge.nl
Sun Nov 10 05:36:11 EST 2002
On 09 Nov 2002 23:48:05 GMT, Tim Daneliuk <tundra at tundraware.com>
wrote:
>class myUI:
>
> def __init__(self, root):
>
> # Setup the visual elements
> self.hSB = Scrollbar(root, orient=HORIZONTAL)
> self.vSB = Scrollbar(root, orient=VERTICAL)
> self.listbox = Listbox(root,
> foreground = FCOLOR,
> background = BCOLOR,
> font = (FNAME, FSZ, FWT),
> selectmode=SINGLE,
> exportselection=0,
> xscrollcommand=self.hSB.set,
> yscrollcommand=self.vSB.set,
> height = HEIGHT,
> width = WIDTH,
> )
>
> self.hSB.config(command=self.y.xview)
> self.hSB.pack(side=BOTTOM, fill=X)
> self.vSB.config(command=self.DirList.yview)
> self.vSB.pack(side=RIGHT, fill=Y)
> self.DirList.pack(side=LEFT, fill=BOTH, expand=1)
Here self.Dirlist is used, but where is it bound to an object?
Anton.
More information about the Python-list
mailing list