Mam to:
from tkinter import * #!Ważne by było zaimportowane w taki sposób
class Application(Frame):
def __init__(self, master):
super().__init__(master)
self.grid()
self.create_widgets()
def create_widgets(self):
pass
root = Tk()
root.title('Title')
root.geometry('500x500')
app = Application(root)
root.mainloop()
I chciałbym dodać do tego karty GUI jak tutaj:
import tkinter as tk
from tkinter import ttk
root = tk.Tk()
root.title('Title')
root.geometry('500x500')
tab_parent = ttk.Notebook(root)
tab1 = ttk.Frame(tab_parent)
tab2 = ttk.Frame(tab_parent)
tab_parent.add(tab1, text = 'Tab 1')
tab_parent.add(tab2, text = 'Tab 2')
tab_parent.pack(expand=1, fill='both')
root.mainloop()