tkmessagebox

Python Notification Popup that disappears

和自甴很熟 提交于 2019-12-04 20:58:35
Is there a way to create a pop up that disappears after a certain number of seconds or minutes. I only find examples of people having trouble with popups that disappear when they are not supposed to. I have found tkMessage box but when I test something with show info it is giving me two boxes and you have to click to get out of it. It's quite distracting. I'd rather have something that disappears, for example, the python program see's that a new email has arrived in and then creates a pop up, which has colour and some text and not distracting. Disappearing after say 60 seconds. You can easily

Tkinter askquestion dialog box

江枫思渺然 提交于 2019-12-04 03:48:19
I have been trying to add an askquestion dialog box to a delete button in Tkinter. Curently I have a button that deletes the contents of a folder once it is pressed I would like to add a yes/no confirmation question. import Tkinter import tkMessageBox top = Tkinter.Tk() def deleteme(): tkMessageBox.askquestion("Delete", "Are You Sure?", icon='warning') if 'yes': print "Deleted" else: print "I'm Not Deleted Yet" B1 = Tkinter.Button(top, text = "Delete", command = deleteme) B1.pack() top.mainloop() Everytime I run this I get the "Deleted" statement even if I press "No". Can an if statement be

tkinter showerror creating blank tk window

雨燕双飞 提交于 2019-12-01 03:30:22
问题 I have a program that needs to display graphical error messages to users. It is a tkinter GUI, so I am using tkinter.messagebox.showerror When I call showerror, it shows the error, but also creates a blank "tk" window, the kind created when an instance of the Tk class is called, like root = Tk() . from tkinter.messagebox import showerror showerror(title = "Error", message = "Something bad happened") Produces How can I make this blank window not appear? 回答1: from Tkinter import * from

Python: Tkinter/ttk themed Message Box

隐身守侯 提交于 2019-11-30 13:11:39
I started making a GUI with Tkinter and I added the module tkMessageBox as well. But recently I discovered that importing the module ttk gives more 'up-to-date' results: buttons and texts boxes appear with the actual style of the current OS. This is: Windows 10 buttons are plain and blue-lighted, and not those shaded gray blocky buttons from previous versions. But unfortunately, I can't find a way to use this ttk themed widgets on the common Dialog Boxes (the ones which I imported from tkMessageBox ). So OK/Cancel dialogs (for instance) still appear with a theme that doesn't belongs to Windows

Correct way to implement a custom popup tkinter dialog box

。_饼干妹妹 提交于 2019-11-26 16:20:53
I just started learning how to create a custom pop up dialog box; and as it turns out, the tkinter messagebox is really easy to use, but it also does not do too much. Here is my attempt to create a dialog box that will take input and then store that in the username. My question is what is the recommended style to implement this? As Bryan Oakley suggested in this comment . I would advise against using a global variable. Instead of having the dialog destroy itself, have it destroy only the actual widget but leave the object alive. Then, call something like inputDialog.get_string() and then del

Correct way to implement a custom popup tkinter dialog box

感情迁移 提交于 2019-11-26 04:22:28
问题 I just started learning how to create a custom pop up dialog box; and as it turns out, the tkinter messagebox is really easy to use, but it also does not do too much. Here is my attempt to create a dialog box that will take input and then store that in the username. My question is what is the recommended style to implement this? As Bryan Oakley suggested in this comment. I would advise against using a global variable. Instead of having the dialog destroy itself, have it destroy only the