Code Point
September 10, 2010, 07:21:10 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Geshi Sintax Hilighting Mod Installed. Tens of languages available.
 
   Home   Help Search Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: centering my box  (Read 2104 times)
fuston05
Jr. Member
*

Karma: 0
Offline Offline

Posts: 14


« on: February 10, 2008, 05:47:34 PM »

i made a box and defind the pixel sizeand cant seem to make it pop up centered, i want it to be full screen and centered. its coming up the correct size, but its position is 1/2 way off the screen, heres what i have so far.

Code:
from Tkinter import *


root = Tk()
root.geometry('1024x768+512+384')
lab = Label(root, text =  'hi, this is my box')
button = Button(root,text = 'button')











button.pack()
lab.pack()
root.mainloop()
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!