0

I am actually making a text editor and obviously I needed text coloring for that. It works perfectly, as I was using it in a thread, which makes it lag a lot. I think if I bind it with every key, it'll work, so when any key is pressed (except spacing keys like ENTER, TAB, BACKSPACE, etc), it'll check if a python keyword is on the screen and change its color.

I am looking for something like this:

textArea.bind("<NonSpacingKeys>", color_coding)
0

1 Answer 1

1

Okay so I read this: How to bind self events in Tkinter Text widget after it will binded by Text widget?

textArea.bind("<KeyPress>", color_coding)

this worked prefectly

Not the answer you're looking for? Browse other questions tagged or ask your own question.