User Profile

Collapse

Profile Sidebar

Collapse
Lestat BZH
Lestat BZH
Last Activity: Oct 27 '11, 03:13 PM
Joined: Oct 17 '11
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Lestat BZH
    replied to Positioning frames on screen
    I even found a way to center my windows:

    Code:
    class Starting_window(Tkinter.Tk):	#First instruction window
    	def __init__(self, parent):
    		Tkinter.Tk.__init__(self, parent)
    		self.parent = parent
    		self.initialize()
    		self.geometry("350x270+%d+%d" %((self.winfo_screenwidth() - 350) / 2,
    										(self.winfo_screenheight() - 270) / 2))
    
    	def initialize(self):
    ...
    See more | Go to post

    Leave a comment:


  • Lestat BZH
    replied to Positioning frames on screen
    Thanks, you're great, it's working fine :)
    See more | Go to post

    Leave a comment:


  • Lestat BZH
    replied to Positioning frames on screen
    Ok, thanks, I didn't know "geometry" could do that ^^

    So, in my code I have this for one of my window:
    Code:
    class Starting_window(Tkinter.Tk):	#First instruction window
    	def __init__(self,parent):
    		Tkinter.Tk.__init__(self,parent)
    		self.parent = parent
    		self.initialize()
    		self.geometry("350x270")
    So, if I want this to be placed close to the top left of the screen, I...
    See more | Go to post

    Leave a comment:


  • Lestat BZH
    started a topic Positioning frames on screen

    Positioning frames on screen

    Hi there,

    I wrote a code that chains multiple frames containing widgets on screen with TkInter, and almost everything is fine except:
    the windows created with TkInter seem to be randomly placed by Windows. I would rather have them always popping at the same location on screen, but I really don't know how to do that...

    Someone may have the answer :)
    Thanks in advance
    See more | Go to post
No activity results to display
Show More
Working...