Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python messagebox

import ctypes # native module

style = 1
ctypes.windll.user32.MessageBoxW(0, 'Your text', 'Your title', style)

## Styles:
# 0 : OK
# 1 : OK | Cancel
# 2 : Abort | Retry | Ignore
# 3 : Yes | No | Cancel
# 4 : Yes | No
# 5 : Retry | Cancel 
# 6 : Cancel | Try Again | Continue
## To also change icon, add these values to previous number
# 16 : Stop-sign icon
# 32 : Question-mark icon
# 48 : Exclamation-point icon
# 64 : Information-sign icon consisting of an 'i' in a circle
Comment

python tkinter messagebox

# We must import messagebox, so we do that
from tkinter import messagebox

#We have 3 options: 
# showinfo - show a dialog with an info icon
# showwarning - show a dialog with a warning icon
# and showerror - show a dialog with a error icon

#every one needs the following inputs:
# title - use a string to make a title for your dialog.
# message - use string to make the message for your dialog

Heres an example using the commands:
showinfo('test info ','test info message')
showwarning('test warning','test warning message')
showerror('test error','test error message')
Comment

PREVIOUS NEXT
Code Example
Python :: discord.py clear command 
Python :: how to hit enter in selenium python 
Python :: how to open an external file in python 
Python :: python pyodbc install 
Python :: load images pygame 
Python :: how to install pygame in python 3.8 
Python :: install googlesearch for python 
Python :: is machine learning hard 
Python :: rectangle in tkinter 
Python :: delete unnamed 0 columns 
Python :: pandas select by column value 
Python :: python function to print random number 
Python :: eigenvectors python 
Python :: python ftp upload file 
Python :: python split path at level 
Python :: favicon django 
Python :: pandas astype string 
Python :: tensot to numpy pytorch 
Python :: sklearn minmaxscaler pandas 
Python :: add sheet to existing workbook openpyxl 
Python :: python datetime module print 12 hour clock 
Python :: install wxpython 
Python :: string of numbers to list of integers python 
Python :: how to set a image as background in tkitner 
Python :: name unnamed column pandas 
Python :: when did guido van rossum create python 
Python :: python merge pdfs 
Python :: openpyxl font 
Python :: get length of csv file with python 
Python :: how to save a model fast ai 
ADD CONTENT
Topic
Content
Source link
Name
6+1 =