Questions tagged [tkmessagebox]

The tkMessageBox is a tkinter module that is used to display message boxes in your applications. This module provides a number of functions that you can use to display an appropriate message.

The tkMessageBox module is used to display message boxes in your applications. This module provides a number of functions that you can use to display an appropriate message.

Some of these functions are showinfo, showwarning, showerror, askquestion, askokcancel, askyesno and askretryignore.

Syntax:

Here is the simple syntax to create this widget:

tkMessageBox.FunctionName(title, message [, options])

Parameters:

FunctionName: This is the name of the appropriate message box function.

title: This is the text to be displayed in the title bar of a message box.

message: This is the text to be displayed as a message.

options: options are alternative choices that you may use to tailor a standard message box. Some of the options that you can use are default and parent. The default option is used to specify the default button, such as ABORT, RETRY, or IGNORE in the message box. The parent option is used to specify the window on top of which the message box is to be displayed.

You could use one of the following functions with dialogue box:

showinfo()

showwarning()

showerror()

askquestion()

askokcancel()

askyesno()

askretrycancel()

85 questions
0
votes
1 answer

Tkinter messagebox, which lists all empty variables

I am coding a gui, which has several varibales for entry boxes and drop-down menus. When pressing the "Calculate-Button", I want it to check if all fields are filled. If not it shall pop up a messagebox and lists the empty widgets. I am not getting…
0
votes
2 answers

Python TKinter on Mac OS does not show message box specific icons

In Mac OS, the tkinter message boxes do NOT show different icons for different types of message box (other than warning). The error, info, and question icons are all the "Python Spaceship" icon and not specific to errors, info, or questions. See…
Dude Rat
  • 41
  • 1
  • 5
0
votes
1 answer

Showing a MessageBox error whenever an entry box is empty

I know that you can check if the entry box is empty by checking its length. I'm having a hard time implementing it though, because my entry boxes are dynamically created and you can't traverse in all of it in a single loop. Here is my code: from…
aryastark
  • 25
  • 5
0
votes
1 answer

Is there a method to create a messagebox in top-level in tkinter?

This code opens a message box on the first window. But I want to open the message box on the second window. From tkinter import * From tkinter import messagebox as m Def b(): A=m.askquestion (" question ","really want to go…
0
votes
2 answers

How can I reprogram the 'Ok' button in the Tkinter Messagebox module

I'm working on my very first python GUI, and I want to close all the previous windows from the code after clicking on the 'OK' button of the Message messagebox.showinfo('Access Granted', 'Your data has been retrieved.')
user11371920
0
votes
1 answer

Python and tkinter: NameError: name 'askyesno' is not defined

I get this error: Exception in Tkinter callback Traceback (most recent call last): File "C:\Python36-32\lib\tkinter\__init__.py", line 1699, in __call__ return self.func(*args) File "C:\Users\Administrator\Desktop\Base\utility.py", line 68, in…
CodeMonster
  • 31
  • 1
  • 9
0
votes
1 answer

tKmessagebox automatic selection after a timeout

I want to display a messagebox with options Yes or No. If user doesn't select any option with in the TIMEOUT(ex:5 sec) Messagebox should be closed with default YES option . How can i achieve it ? Below is the code i used but it resp value is always…
0
votes
1 answer

MessageBox not disapearing after I click ok

I am trying to make a number guesser in python 2.7 with Tkinter. I am having trouble on making the MessageBox disappear after I hit ok. import random import Tkinter import tkMessageBox import tkSimpleDialog root = Tkinter.Tk() Random_Pick =…
0
votes
1 answer

How to bind keyboard event to Python tkMessageBox?

I'm developing a small GUI application which is required to work with a wireless presenter pointer, which has only two keys: left arrow and right arrow. I can bind keyboard event "Left" and "Right" to the root (the main window) and call a function,…
Vespene Gas
  • 3,210
  • 2
  • 16
  • 27
0
votes
1 answer

Widgets disappear after tkMessageBox in Tkinter

Every time I use this code in my applications: tkMessageBox.showinfo("Test", "Info goes here!") a message box pops up (like it is supposed to), but after I click OK, the box disappears along with most of the other widgets on the window. How do I…
Zac Brown
  • 5,905
  • 19
  • 59
  • 107
0
votes
0 answers

non blocking popup message tkinter

I'm building control application that blocks the user from using the computer until it get unlocked by the operator. During the lock, the operator can send messages to the user's computer, and those messages showed to the user by popup…
0
votes
1 answer

tkMessageBox Crashes Python Application Upon Running

import Tkinter import tkMessageBox def created(): tkMessageBox.showinfo('File Created!', 'Letter.html Created on Desktop') class simpleapp_tk(Tkinter.Tk): def __init__(self,parent): Tkinter.Tk.__init__(self,parent) …
Michael Zheng
  • 136
  • 1
  • 9
0
votes
0 answers

Tkinter Python 3, How to remove greyish white strip on a tkinter.messagebox window?

I am making a tkinter app in Python 3. Whenever I make a tkmessage box, for example with tkinter.messagebox.showinfo(), the whole bottom part of the window (the part where the button is located) including the button appears as a greyish white strip.…
DaE-Asew
  • 137
  • 1
  • 7
0
votes
0 answers

what are the options of showinfo in tkMessagebox module?

help on showinfo() is quite laconic: Help on function showinfo in module tkMessageBox: showinfo(title=None, message=None, **options) Show an info message Where can I find more information about possible options?
Laurent D.
  • 449
  • 4
  • 19
0
votes
1 answer

How can show a message while my script is running

I've created a script in Python, which can run up to a minute. While my script is running I like to give the user a messagebox in windows7 that the script is running. A possible thing is to display a Message when the script starts and to unload this…
wb1981
  • 1
  • 2