Python / Tkinter: selecting trap text using keyboard / mouse as an event?

Is it possible to catch the selection of text using keyboard and mouse as a select / select_exchange event type? (I know that I can track the selection using the keyboard, observing each keypress and comparing the selection range - but I don't see a way to detect the selection via the mouse or as a discrete event in itself)

I've looked at the following Tkinter event documentation and can't see the selection / selection_changed event type. http://infohost.nmt.edu/tcc/help/pubs/tkinter/events.html

Perhaps some of you Tkinter / Tk veterans might have some clever ideas?

Thanks, Malcolm

0


source to share


1 answer


The text widget <<Selection>>

fires the event and the listbox fires the event <<ListboxSelect>>

. Do any of them meet your needs?



0


source







All Articles