Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8203605
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T07:36:56+00:00 2026-06-07T07:36:56+00:00

I need a simple info box to display some status output, that I would

  • 0

I need a simple info box to display some status output, that I would alternatively dump to the console using print. The easiest possibility that I found is the following:

import Tkinter as tk
root = tk.Tk()
root.withdraw()

from tkMessageBox import showinfo    
showinfo('some caption', 'some info')

The only problem with this implementation is that my program (not written in Tkinter) will not continue running, until the ‘ok’ button of the showinfo messagebox is pressed. That is, the showinfo dialog will block.

Therefore my question: Is there a simple way to make showinfo non-blocking? Are there alternative messagebox implementations in Tkinter that are non-blocking? I can think of the typical use-cage of showing a help page – the window should open and the main program keeps on running normally.

EDIT1: here’s a simple help window that I came up with, but unfortunately it doesn’t show up, unless I launch a different tkMessageBox or a similar object:

class TextInfo(object):

    def __init__(self, parent, window_title = 'window', textfield = 'a text field', label = None):

        self.top = tk.Toplevel(parent)
        self.parent = parent
        self.window_title = window_title
        self.textfield = textfield

        # set window title
        if window_title:
            self.top.title(window_title)

        # add label if given
        if label:
            tk.Label(self.top, text=window_title).grid(row=0)

        # create the text field
        self.textField = tk.Text(self.top, width=80, height=20, wrap=tk.NONE)
        if textfield:
            self.textField.insert(1.0, textfield)
        self.textField.grid(row=1)

        # create the ok button
        b = tk.Button(self.top, text="OK", command=self.ok)
        b.grid(row=2)

    def ok(self):
        self.top.destroy()

And this is how I call the window:

root = tk.Tk()
root.withdraw()
TextInfo(self.root, window_title, textfield, label)  
# don't call root.mainloop() here, because this will lead to blocking.

Is there some kind of property or event that I need to set for the window to show up? If I call root.mainloop() the window will show up, but then my GUI is blocked again.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T07:36:58+00:00Added an answer on June 7, 2026 at 7:36 am

    Don’t use the tkMessageBox as it doesn’t allow much configuration. Just create your own custom dialog that looks like one. This page talks a lot about creating custom Tkinter dialogs.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need some simple databinding for a Spinner. I want to display 2 items
I've created a simple Facebook app that doesn't need any data/info from users. When
I need a simple web based tool/CMS/app which could be linked to some repository
I need a simple application, preferably a cross-platform one, that enables sending of files
I need a simple proxy PHP function/script that can download a file from a
I need an simple way to check whether a string that is sent to
I am trying to extract some info from a website using simple_html_dom. Currently I
I need to get some info passed as a lambda expression to some methods.
Quite a simple one i would think, but i need to be able to
I’d like to open a dialog box with some simple information on it when

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.