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

In tk: How do I inactivate a frame by opening another frame in front of it?

Hi!!

I'm buildning a minesweeper and when the game is won, i want to inactivate the game board and have a pop-up saying "you won". I've heard that it's possible to inactivate a frame by opening another on top. How do i do this and what kind of frame should i use? (thankful for whole code on how to create a pop-up like this).

thank you!
Feb 27 '08 #1
1 1100
dazzler
75
I hope this could help you, so the answer is using Toplevel windows, and if you already have Toplevel window use the -topmost option

Expand|Select|Wrap|Line Numbers
  1. def winning_popup():
  2.  
  3.    def close_winning_popup():
  4.       winning_popup.destroy()
  5.  
  6.    winning_popup = Toplevel(width=300, height=125, bg="#4C5844")
  7.    winning_popup.resizable(width=False, height=False)
  8.    winning_popup.title("You Won")
  9.    winning_popup.wm_attributes("-topmost",1) #Use this if you already have Toplevel windows and want to put this over it
  10.  
  11.    winning_popup_button = Button(winning_popup, text="Close", cursor="hand2", bg="#A9A9A9", command=close_winning_popup)
  12.    winning_popup_button.place(relx=1, rely=1, x=-5, y=-5, anchor=SE, relwidth=0.25)
  13.  
Feb 29 '08 #2

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

Similar topics

6
by: Praveen | last post by:
Hi All, I Created a Oracle user(schema) in my database. Now instead of droping the oracle user(schema), i want to inactivate it. Can anyone tell me how to inactivate the user instead of...
3
by: Chris Wilkinson | last post by:
Hi there, I'm creating a frames website, which consists of a nav bar down the left of the screen (name="frame1") and a content frame filling the right hand side (name="frame2"). I've used nice...
1
by: sunnysrivastava84 | last post by:
I want to inactivate a row such that it is not deleted from the table but it is not visible when i click the search button,plz give me the code and query thanx
6
by: Praveen | last post by:
Hi All, I Created a Oracle user(schema) in my database. Now instead of droping the oracle user(schema), i want to inactivate it. Can anyone tell me how to inactivate the user instead of...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...

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.