Python Forum
tkinter how to unselect text in textbox
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
tkinter how to unselect text in textbox
#1
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
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [Tkinter] textbox compare command not working for me dmac6809 5 1,731 Jul-09-2025, 04:35 PM
Last Post: deanhystad
  recording textbox data into a variable paul18fr 4 2,545 Feb-19-2024, 09:30 PM
Last Post: Axel_Erfurt
  [Tkinter] Updating tkinter text BliepMonster 5 15,170 Nov-28-2022, 01:42 AM
Last Post: deanhystad
  [Tkinter] The Text in the Label widget Tkinter cuts off the Long text in the view malmustafa 4 14,148 Jun-26-2022, 06:26 PM
Last Post: menator01
  tkinter change the text of the checkbox zazas321 1 6,329 Sep-17-2021, 06:19 AM
Last Post: zazas321
  tkinter text widget word wrap position chrisdb 6 13,399 Mar-18-2021, 03:55 PM
Last Post: chrisdb
  [Tkinter] tkinter.Menu – How to make text-variable? Sir 3 8,798 Mar-10-2021, 04:21 PM
Last Post: Sir
  [Tkinter] Tkinter Textbox only showing one character Xylianth 1 3,578 Jan-29-2021, 02:59 AM
Last Post: Xylianth
Photo Tkinter TEXT background image _ShevaKadu 5 12,496 Nov-02-2020, 10:34 AM
Last Post: joe_momma
  tkinter | Button color text on Click Maryan 2 5,344 Oct-09-2020, 08:56 PM
Last Post: Maryan

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020