0

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)

`

Bryan Oakley
  • 370,779
  • 53
  • 539
  • 685
  • Have you tried simply binding a custom function to ``? Also, if the selectmode is set to EXTENDED, using the arrow keys will deselect everything except one item. Are you aware of that? Do you need help with that, too? – Bryan Oakley Jun 15 '15 at 21:02
  • Yes. I am aware of that. To clarify, I need the select mode to function as MULTIPLE when the spacebar is pressed, and EXTENDED on double click. As if, ctrl + single click is being pressed when the spacebar is hit. Setting the selectmode to a variable and toggling it to MULTIPLE in the first line of the function the spacebar is bound to does nothing. – molexmonkey Jun 15 '15 at 21:52
  • You are going to need more that just a space binding. You'll need to add custom bindings for the up and down keys, too. – Bryan Oakley Jun 15 '15 at 23:24

0 Answers0