-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
I recently began developing a project that requires dynamic text-color highlighting inside a CustomTkinter Text widget. As part of the implementation, I needed the ability to color specific words as well as entire lines based on certain conditions. After researching different approaches, I discovered that CustomTkinter’s underlying tagging system—used together with the Text.find() method and index-based text positioning—offers an effective way to identify and style targeted text segments.
Using this logic, I created a dedicated helper class that encapsulates the behavior, defining two separate methods: one for coloring an entire line and another for highlighting only individual words. I also plan to integrate this functionality into the current project to enhance readability and improve the overall user experience.
