Files
2026-10-19 20:29:13 +02:00

26 lines
677 B
Python

import tkinter as tk
from my_package.App_window import AppWindow
class TrainingApp(AppWindow):
def __init__(self,width,height):
super().__init__(width,height)
self.listbox = None
self.entry = None
self.button = None
def on_click(self):
self.listbox.insert(tk.END,self.entry.get())
self.entry.delete(0,tk.END)
def init_widgets(self):
self.listbox = tk.Listbox(self.root)
self.listbox.pack()
self.entry = tk.Entry(self.root)
self.entry.pack()
self.button = tk.Button(self.root, text="save", command=self.on_click)
self.button.pack()
t = TrainingApp(500,500)
t.run()