473,397 Members | 1,949 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,397 software developers and data experts.

Tkinter Button Window exiting whilst running pygame

I am a student and I am currently working on an assessment. I am using Tkinter buttons to continue the game. Since I am having multiple buttons, I need to be able to exit out of the button window after i press the button. I have asked many sources including my teachers but all appear to be on dismissing the single button. Can i please have help exiting the Tkinter WINDOW whilst continuing to run pygame.

P.S I am running python 2.7 and the latest pygame.
Aug 3 '15 #1
2 2283
dwblas
626 Expert 512MB
You can use grid_forget(), or whatever geometry manager you are using, to remove the frame, and the buttons that are in it. Effbot's doc http://effbot.org/tkinterbook/grid.htm
Aug 3 '15 #2
bvdet
2,851 Expert Mod 2GB
Here is another possibility:
Expand|Select|Wrap|Line Numbers
  1. window.grab_release()
  2. window.withdraw()
  3. # do stuff here
  4. # restore the window
  5. window.deiconify()
  6. window.grab_set()
  7.  
Aug 3 '15 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: mksql | last post by:
New to Tkinter. Initially, I had some code that was executing button commands at creation, rather than waiting for user action. Some research here gave me a solution, but I am not sure why the...
2
by: Paul A. Wilson | last post by:
I'm new to Tkinter programming and am having trouble creating a reusable button bar... I want to be able to feed my class a dictionary of button names and function names, which the class will make....
6
by: Elaine Jackson | last post by:
I've got a script where a button gets pushed over and over: to cut down on the carpal tunnel syndrome I'd like to have the button respond to presses of the Enter key as well as mouse clicks; can...
1
by: Elaine Jackson | last post by:
In the script I'm writing, there's a Tkinter Button that contains a square image at some times and is blank at other times. Is there a smart way to make its dimensions stay the same throughout all...
0
by: Casey Hawthorne | last post by:
Is there a better way to delete the image from a Tkinter button other than the following: - reconstructing the button - image=blank.gif -- Regards,
3
by: Shankar Iyer (siyer | last post by:
Hi, I have another Tkinter-related question. At the beginning of my program, a tkinter window is created with six buttons. Each of these buttons is assigned a function that should be executed...
5
by: crystalattice | last post by:
I'm creating a shelve interface using Tkinter. I have a button that allows the user to modify an existing entry; when the button is clicked, a new TopLevel window appears with Entry boxes holding...
4
by: Darwin Lalo | last post by:
I have read a lot of document. But I can't find a little clue. I want get the text & event in a window of a running process. I have not the source code of the process,of course. It is like...
5
Thekid
by: Thekid | last post by:
I'm working on a Tkinter project that has several toplevel windows and I'm having a problem placing the buttons on the windows where I want them to be. For now I'm working on getting the templates...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.