A voir également:
- Tkinter placer un bouton
- Bouton shift pc ✓ - Forum Windows
- Bouton on off ✓ - Forum Loisirs / Divertissements
- Placer des points sur une carte - Guide
- Quel est la touche shift sur le clavier ✓ - Forum Jeux vidéo
- Réinitialiser chromecast sans bouton - Guide
4 réponses
Bonjour Mathis,
Comme ça, par exemple:
# -*- coding:Latin-1 -*-
from tkinter import *
from tkinter import messagebox
def coucou():
messagebox.showinfo('coucou')
WIDTH=400
HEIGHT=150
main_win = Tk()
main_win.configure(background = 'azure')
main_win.title('Test widgets')
main_win.geometry(str(WIDTH)+'x'+str(HEIGHT)+'+300+100')
b1 = Button(main_win, text='Afficher', command=coucou)
b1.place(x = 320,y = 10)
main_win.mainloop()
Comme ça, par exemple:
# -*- coding:Latin-1 -*-
from tkinter import *
from tkinter import messagebox
def coucou():
messagebox.showinfo('coucou')
WIDTH=400
HEIGHT=150
main_win = Tk()
main_win.configure(background = 'azure')
main_win.title('Test widgets')
main_win.geometry(str(WIDTH)+'x'+str(HEIGHT)+'+300+100')
b1 = Button(main_win, text='Afficher', command=coucou)
b1.place(x = 320,y = 10)
main_win.mainloop()