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
0 answers

How to start tkmessagebox from different class than main GUI?

I have a class GUI, where I set up all my widgets etc. for my GUI. I use threading to start a process from another class. This works fine, as long that other process just runs through. In some cases, I need to wait for a user input to proceed. I…
0
votes
1 answer

tkinter messagebox askyesno starnge response

As per request by Bryan Oakley,fuller code pertaining to my question testerday ( don't know how to do this without another question) #!/usr/local/bin/python3 # -*- coding: utf-8 -*- import ast from tkinter import * import…
user1478335
  • 1,769
  • 5
  • 25
  • 37
0
votes
1 answer

tkinter deleting a messagebox contents

I use a messagebox as a widget to display results from a random number generator. The number of random numbers is chosen through an entry box. Using def evClear(): from_draws.delete(0,END)# clears only entry value from_draws.focus() …
user1478335
  • 1,769
  • 5
  • 25
  • 37
-1
votes
2 answers

How to show alerts in tkinter?

I want to show alerts in tkinter in python. Is there anyone who can tell me how to show alerts?
-1
votes
1 answer

Popup / Message while python script is executing

I want to show a message(popup) while python script is executing and automatically disapper when the script done exectuing import sys from tkinter import ttk from tkinter import messagebox try: import Tkinter as tk except ImportError: …
-1
votes
1 answer

Python-for in messagebox message

I have a list of products products = ["meat","salad","tomatoes"] And I want to display them in a tkinter messagebox object, as the message. So want something like this: This products are already in the list: -meat -salad -tomatoes But how can I…
Steve
  • 73
  • 1
  • 1
  • 13
-1
votes
1 answer

How to properly implement tkMessageBox in Python3.4?

I want to launch a warning using tkMessageBox in Python3. This warning is supposed to launch when a user doesn't select an element from a listbox. Unfortunately whenever I try to implement message box it does not launch like it is supposed to. I…
Archit Mahto
  • 29
  • 1
  • 4
-2
votes
1 answer

Problem regarding messagebox module in Tkinter

My message box launches automatically without me clicking the button first when I run it in Pycharm. from tkinter import * from PIL import ImageTk,Image from tkinter import messagebox root =…
Nuked22
  • 3
  • 1
-2
votes
1 answer

I can't seem to get tkMessageBox.askokcancel in Python 2.7 to get to work

I have written the following code closeButton = Button(self, text="Close",command=self.askyesno) closeButton.pack(side=RIGHT, padx=5, pady=5) okButton = Button(self, text="OK") okButton.pack(side=RIGHT) def askyesno(): res =…
-3
votes
1 answer

tkinter messagebox without console

Facing a problem when converting my .py file to .exe using pyinstaller --noconsole, the messagebox won't work in exe file except if I created it without using --noconsole or --windowed. I have tried to not use --noconsole and use .pyw file instead…
AmdDwg
  • 11
  • 3
1 2 3 4 5
6