So i just want to make this window a text widget thats always on top. Im trying to add this widget but it keeps creating another window...
import tkinter as tk
from tkinter import ttk
class App(tk.Frame):
def __init__(self, master, *args, **kwargs):
tk.Frame.__init__(self, master, *args, **kwargs)
self.pack()
hello="hello"
self.tb = tk.Text(self)
self.tb.pack(expand=1, fill = tk.BOTH)
self.tb.insert(tk.END, hello)
topLevelWindow = tk.Toplevel(self)
# Make topLevelWindow remain on top until destroyed, or attribute changes.
topLevelWindow.attributes('-topmost', 'true')
if __name__ == "__main__":
root = tk.Tk()
main = App(root)
root.mainloop()