How do I bind the spacebar to the default function of ctrl in a listbox in python 3.4 with tkinter

265 views Asked by At

I have a list box. the select mode is set to EXTENDED. Essentially, I want to replace holding ctrl + left mouse click with tapping the space bar to select multiple items in the list. the default selection of a single item is currently bound to left double click and works properly. I do not want to change the functionality of that. Any ideas?

directoriesList = Listbox(frame, selectmode = EXTENDED,  exportselection = 0, background = '#FFFFFF', foreground = '#000000', selectbackground = '#000000', selectforeground = '#FFFFFF')

directoriesList.bind("<Return>", pathAppend)

directoriesList.bind("<Double-Button-1>", pathAppend)

`

0

There are 0 answers