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 1048851
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T16:31:24+00:00 2026-05-16T16:31:24+00:00

Why are the commands to change the window position before and after sleep(3.00) being

  • 0

Why are the commands to change the window position before and after sleep(3.00) being ignored?

if self.selectedM.get() == 'Bump':
        W1 = GetSystemMetrics(1) + 200
        print W1
        w1.wm_geometry("+100+" + str(W1))
        w2.wm_geometry("+100+" + str(W1))
        w3.wm_geometry("+100+" + str(W1))
        w4.wm_geometry("+100+" + str(W1))
        self.rvar.set(0)
        self.rvar2.set(0)
        self.rvar3.set(0)
        self.rvar4.set(0)

        s = self.wm_geometry()
        geomPatt = re.compile(r"(\d+)?x?(\d+)?([+-])(\d+)([+-])(\d+)")

        m = geomPatt.search(s)
        X3 = m.group(4)
        Y3 = m.group(6)

        M = int(Y3) - 150

        P = M + 150


        MH = W1
        MUH = Y3


        while Y3 > M:
            sleep(0.0009)
            Y3 = int(Y3) - 1
            self.update_idletasks()
            self.wm_geometry("+" + str(X3) + "+" + str(Y3))
            print 1

        Alpha = 1.0
        #while 0.0 < Alpha :
         #   Alpha = Alpha - 0.01
          #  self.attributes("-alpha", Alpha)
           # sleep(0.005)




        self.wm_geometry("+" + str(X3) + "+" + str(MH))

        sleep(3.00)

        self.wm_geometry("+" + str(X3) + "+" + str(MUH))




        #while 1.0 > Alpha :
         #   Alpha = Alpha + 0.01
          #  self.attributes("-alpha", Alpha)
           # sleep(0.005)

        while Y3 < P:
            sleep(0.0009)
            Y3 = int(Y3) + 1
            self.update_idletasks()
            self.wm_geometry("+" + str(X3) + "+" + str(Y3))
  • 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-05-16T16:31:25+00:00Added an answer on May 16, 2026 at 4:31 pm

    The answer to your question is that you don’t give the system a chance to update the display. The display is updated by the event loop but you don’t enter the event loop after either of the wm_geometry calls surrounding the sleep(3.00) call. They aren’t being ignored, it’s just that you’re changing the geometry again before the system has a chance to update the display.

    Does the answer to the question Having Trouble with Tkinter Transparency help you solve this problem too?

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

Sidebar

Related Questions

How to change and update the title of the command prompt window from the
I would like to be able to change the title of the Command window
I'm using the SetWindowPlacement function to (1) maximize and (2) change the restore position
I want to change the title of the gnome-terminal window to reflect the current
How can I change the title of the command prompt window every time I
How can I use the Windows command line to change the extensions of thousands
How to change user credentials of windows service from command line?
Is it possible to use any javascript command to change the current font size
I am trying to change the directory in the command line from a gen_server
I need to be able to change a projects build command in my Eclipse

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.