from tkinter import *
class Texteditor:
def __init__(self):
self.fenster = Tk()
editor = Frame()
scrollx = Scrollbar(editor, orient="horizontal")
scrolly = Scrollbar(editor, orient="vertical")
self.text = Text(editor, wrap=NONE, xscrollcommand=scrollx.set, yscrollcommand=scrolly.set)
scrollx.config(command=self.text.xview)
scrolly.config(command=self.text.yview)
scrollx.pack(side="bottom", fill=BOTH)
self.text.pack(side="left",expand=True,fill=BOTH)
scrolly.pack(side="right", fill=BOTH)
editor.pack(side="bottom", fill=BOTH, expand=True)
buttons = Frame()
load = Button(buttons, text="öffnen", command=self.open)
save = Button(buttons, text="speichern", command=self.save)
load.pack(side="left")
save.pack(side="left")
buttons.pack(side="top")
def open(self):
pass
def save(self):
pass
def start(self):
self.fenster.mainloop()
editor = Texteditor()
editor.start()