Thread: Creating 100%

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2005
    Location
    West Sussex
    Posts
    25
    Rep Power
    0

    Creating 100%


    Ok, I come from a HTML background, and say for example I create a table you put for the width 100% to make it stretch all the way across the screen no mater what resolution you have or the size of the programs base... well cut the storey short, is there a way of doing such a thing in Python? For example say I want (in Tkinter) a Text box to be the whole size of the program even when you resize it, how would it go? I had ago and put something like this:
    Code:
    Text1 = Text(root)
    Text1.geometry("100%x100%")
    Text1.pack()
    But soon found out it didnít work

    Please Help Me A-Team
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2004
    Posts
    394
    Rep Power
    52
    Hi!

    Python Code:
    t = Text()
    t.pack(fill=BOTH, expand=1)


    Regards, mawe

    Comments on this post

    • SteveFerrigno agrees : Thank You :D
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2005
    Location
    West Sussex
    Posts
    25
    Rep Power
    0
    You son of a gun, your faster then lighting at replying Thank you soooo much
  6. #4
  7. Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Dec 2004
    Location
    Meriden, Connecticut
    Posts
    1,797
    Rep Power
    155
    Originally Posted by SteveFerrigno
    You son of a gun, your faster then lighting at replying Thank you soooo much
    Heh. This is because mawe ♥ Tkinter. I've noticed he answers most all of the questions pertaining to Tkinter coding.

IMN logo majestic logo threadwatch logo seochat tools logo