corentin.bollet
1 year ago
2 changed files with 33 additions and 3 deletions
@ -0,0 +1,24 @@ |
|||||
|
import tkinter as tk |
||||
|
from tkinter import ttk |
||||
|
from tkinter.messagebox import showinfo |
||||
|
|
||||
|
|
||||
|
class App(tk.Tk): |
||||
|
def __init__(self): |
||||
|
super().__init__() |
||||
|
|
||||
|
# root |
||||
|
self.title('Jeu de rôle') |
||||
|
self.geometry('500x500') |
||||
|
|
||||
|
# label |
||||
|
self.label = ttk.Label(self, text='Bienvenue !') |
||||
|
self.label.pack() |
||||
|
|
||||
|
# button |
||||
|
self.button = ttk.Button(self, text='test') |
||||
|
self.button['command'] = self.button_clicked |
||||
|
self.button.pack() |
||||
|
|
||||
|
def button_clicked(self): |
||||
|
showinfo(title='Information', message='Bonjour !') |
Loading…
Reference in new issue