Mar-27-2018, 05:09 AM
(Mar-27-2018, 04:34 AM)Larz60+ Wrote: Please read https://python-forum.io/misc.php?action=help&hid=25
you should be using python bbcode tags around your code.
There's no indentation in what you posted, so it's difficult to see what is indented and what is not.
If you use the proper tags, indentation will be preserved.
sorry about that. the code works it just dont work the way id like it to.
def greet(self): text = Text(self) with open('PhData.txt') as f: text.pack_forget() newText = f.read() text.insert(END, newText) text.pack() text.tag_add(newText, "1.0", "1.2") text.tag_add("start", "1.0", "1.3", "2.0", "2.5") text.tag_config("start", background="black", foreground="green")id like it to just replace the text on the same windows whenever it receives it. but i im having a hard time figuring out how to make it replace instead of create a new window