Tkinter Message box to show info & to take confirmation choice as input by showing options to user

plus2net
plus2net
4.1 هزار بار بازدید - 3 سال پیش - We can show message boxes
We can show message boxes or dialog boxes to user by using messagebox library. We have to import this library first. from tkinter import messagebox as msg
There are two types of message boxes, one is where we provide information to the user but don’t want any choice from the users. User only acknowledge  the information by clicking the OK button. Other type is where we ask user to give a choice by using YES , NO or Cancel button.  Here we will collect the user selection and use the same for further processing.
To display information only we will use these methods
showerror, showinfo,showwarning

To display information and ask user to give choice
askokcancel,askyesno,askquestion,askretrycancel,askyesnocancel

To display the message box we will place one button and on click of the button we will run one function. This function once run will call for the message box to display.
The user choice of the message box we will display using one Label.
We can customize the message of the message box by using variables and configure the message.

https://www.plus2net.com/python/tkint...

#messageBox #tkinterMessageBox #tkinter #GUI #pythonGUI #confirmationbox #showmessageTkinter #plus2net #confirmationwindow
3 سال پیش در تاریخ 1400/05/29 منتشر شده است.
4,110 بـار بازدید شده
... بیشتر