Python Forum

Full Version: tkinter how to unselect text in textbox
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

In my program, I use tkinter and a textbox contenent a text. The text should be select, unselect and select a next word

My code select word but don’t unselect

my code

liscence creaticw commons you can use this code only if you put the urlsource and my name no comercial usage are permed you can only use this code if you mak a free softwate programmr see gplv3

for l in self.list :

pos=1

self.textBox.tag_add(SEL,str (float (pos)),str (float (pos+len(l)-1) ) )
# https://python-forum.io/Thread-How-to-de...1#pid47751 Larz60+
self.textBox.update()
self.textBox.mark_set(INSERT,str (float (pos) ))
self.textBox.see(INSERT)



indent preformatted text by 4 spaces
but my code select a wold but bo unselect and select the next word

how to unselect a word or all word on tkinter textbox

thanks for your support

Best regards

Battamt