Hi!

Is there a way to get rid of the selection (blue area in the window) after
double-clicking on a Text widget? I use Vista and Python 3.2.3. I have the
following example:

import tkinter as tk

root = tk.Tk()

def dbclick(e):
    print('db click')
    #Can I add some code here to automatically prevent the selection from
appearing?

txt = tk.Text()
txt.insert('insert', 'fooo')
txt['state'] = 'disabled'
txt.bind('<Double-Button-1>', dbclick)
txt.pack()

root.mainloop()
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss@python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss

Reply via email to