1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
from tkinter import *
from tkinter.ttk import *
class Application(object):
def __init__(self):
self.root = Tk()
self.root.title("Application")
Frame_1 = Frame(self.root, width=300, height=200)
Frame_2 = Frame(self.root, width=300, height=200)
Frame_3 = Frame(self.root, width=300, height=200)
Frame_4 = Frame(self.root, width=300, height=200)
Button_1 = Button(Frame_1, text="Bouton")
Button_1.grid(column=0, row=0)
Notebook_1 = Notebook(self.root, width=300, height=200)
Notebook_1.grid(row=0, column=0)
Notebook_1.add(Frame_1, text="Onglet 1")
Notebook_1.add(Frame_2, text="Onglet 2")
Notebook_1.add(Frame_3, text="Onglet 3")
Notebook_1.add(Frame_4, text="Onglet 4")
if __name__ == '__main__':
f = Application()
f.root.mainloop() |
Partager