473,320 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Tk -- stupid blank dialog opens up in background

I am just starting with python, I found it anoying that when I use Tk, a
blank dialog always opens up behind tkMessageBox or whatever other gui
element one executes.. Is their a way of disabling this?
Jul 18 '05 #1
1 1928
"bmgz" <bm**@dev.null> wrote:
I am just starting with python, I found it anoying that when I use Tk, a
blank dialog always opens up behind tkMessageBox or whatever other gui
element one executes.. Is their a way of disabling this?


the "blank dialog" is Tkinter's root window.

to eliminate that, explicitly create a root and withdraw it before
proceeding:

root = Tkinter.Tk()
root.withdraw() # won't need this

if you're building a full-blown Tkinter application, the usual approach is
to put your widgets in the root window:

root = Tkinter.Tk()

mybutton = Button(root, text=...)
mybutton.pack() # etc

</F>


Jul 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: ashbless | last post by:
i have a program that starts up with a dialog, which invokes a class according to user input, and that class opens a frame..in fact, frame opens but it is not painted, and invoking paint/repaint...
2
by: martin de vroom | last post by:
Hi, I have a web page that opens a modal dialog (client side) in the following manner onclick="window.showModalDialog('/dialog.asp',null,'dialogHeight: 200px; dialogWidth: 400px; dialogTop:...
38
by: Shaun McKinnon | last post by:
HI...Here's my problem...I have a popup window that loads when i want it to, but it's not sized properly. I've set the size, but it doesn't seem to work. I've been on 8 different websites to find...
1
by: ASH | last post by:
Hello all, I'm using the "API: Call Windows File Open/Save Dialog Box" to source the name of a file to open. The Dialog Box when called opens in the top left hand corner of the screen. I have...
4
by: dave | last post by:
I have an app that uses the OpenFile Dialog class. When I invoke the ShowDialog method, the hourglass appears and just stays. The dialog window never opens. I created a test form with an...
0
by: Raj Chudasama | last post by:
In dot net 2003 on Xp when you go to the file menu and select Open file a dialog box opens up on the left hand side there are items such as history My Projects Desktop Favorites My Network...
5
by: B-Dog | last post by:
I'm trying to build a custom progress bar that will run as some subs are running in the background but when I open the custom form with the progress bar on it using the showdialog, none of the subs...
6
by: John | last post by:
In a form how I can I trap for the action that a user opens the built in 'find dialog'? I would like to trap for it and before the dialog shows up, I would like to execute some code, and after that...
7
by: Masterfrier | last post by:
Hi there! in my app, i open a Dialog, in this dialog i use the FileOpenDialog, when i click on 'Ok' or 'Cancel' in my FileOpenDialog, it automatically closes the parent dialog, with a...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.