Help with Windows Geometry in Python -


why commands change window position before , 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)) 

the answer question don't give system chance update display. display updated event loop don't enter event loop after either of wm_geometry calls surrounding sleep(3.00) call. aren't being ignored, it's you're changing geometry again before system has chance update display.

does answer question having trouble tkinter transparency solve problem too?


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -