Solution Exercice 4 de la série de TP Tkinter.
Télécharger la série de TP: https://drive.google.com/file/d/1J5BL8-BxR7A9__lz2vm3CPtMc9Z1uMQY/view
Lien vers le code: https://www.tresfacile.net/solution-exercice4-bouton-quitter-la-fenetre-en-python-tkinter/
Enoncé de l'exercice 4: Ecrire un programme en python Tkinter qui affiche à l'utilisateur une fenêtre affichant un bouton 'fermer la fenêtre !' permettant de fermer la fenêtre au click par deux méthodes différentes : l'une en donnant une action au bouton de commande et l'autre en intégrant directement l'action quit sur l'objet Button:
Dans cet exercice, nous montrons comment créer une fenêtre Tkinter dotée d'un bouton de commande permettant de fermer la fenêtre Tkinter en cliquant sur ce dernier. Nous traiton cet exercice python tkinter de deux façons différente l'une en insérant directement la commande quit sur le code du bouton tkinter, l'autre en faisant appel à une methode externe qui réalise l'action. Pour un bon visionnage de la vidéo utiliser le navigateur Google chrome.
Exercise 4: Write a program in python Tkinter which displays to the user a window displaying a button 'close window!' allowing to close the window on click by two different methods: one by giving an action to the command button and the other by directly integrating the quit action on the Button object:
In this exercise, we show how to create a Tkinter window with a command button to close the Tkinter window by clicking on it. We treat this python tkinter exercise in two different ways, one by directly inserting the quit command on the code of the tkinter button, the other by using an external method that performs the action. For a good viewing of the video use the Google chrome browser.