Customtkinter brackets + color text?
Hey! I'm currently working with UIs in Python and came across customtkinter and the following problem: self.textbox.insert("0.0", f"(text1) text2 text3\n") I would like to color the brackets around text1 red and text2 green, but I can only change the entire text to one color. It would be nice if someone could help me.
LG
In tkinter itself, there is the option to assign text to a (or more) tag(s). One day can be connected to a specific style below.
Example:
Here two texts (“red text”, “blue text”) are inserted, each one gets assigned one day (Red, blue). Via tag_configure determines which style is to be associated with a created day, which ultimately also affects the representation of the inserted text.
only does this in combination with customtkinte not work as I would like
This also works with customtkinter. There is the method (the CTkTextbox) to the day configuration tag_config.
Pass