Event about a selection

thomas sabathe sabathe at emi.u-bordeaux.fr
Tue Apr 22 13:00:16 EDT 2003


Hi,

In a text, a selection appears when a "double-clic" is done.
But I don't know how to get this selection back. How can I do ?

For example:

def modif(event):
    index = myText.tag_ranges(SEL)
    myText.tag_add('valid', index[0], index[1])

myText.bind('<ButtonRelease-1>',modif)



This works, but I'd like to modify the selection with a "double-clic".
It works only with '<ButtonRelease-1>'.

I've read that this key returns the position of the beginning and the
position of the ending of this selection.
I would like to do the same thing with a "double-clic" only.

I don't know what to do because it doesn't work, even if I disactivate
the "simple-click".


Thank you in advance for helping me.






More information about the Python-list mailing list