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

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

    anchoring help :)


    Ok, well itís been along time since I last posted, but anyway, I was just wondering if there was a way of anchoring a label to a corner in Tkinter for example:
    Code:
    Lable1.pack(anchor=E)
    That would just make it stay at the right hand of the program but at the top. I would like the label to be on the bottom anchored to the right side. So I though I'd give it ago but failed, i put:
    Code:
    Label1.pack(anchor=E,S)
    But unfortunately it didnít work

    Please could someone explain if it is possible or not and if so how? thank you

    Steve
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2004
    Posts
    394
    Rep Power
    52
    Hi!

    Maybe like this:
    Python Code:
    from Tkinter import *
     
    root = Tk()
    root.geometry("100x100+0+0")
     
    Label(text="a").pack(side=BOTTOM, anchor=E)
     
    root.mainloop()


    Regards, mawe

    Comments on this post

    • SteveFerrigno agrees : IT WORKS! :D THANKS!
  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
    Thank you so much, your a star

    Steve

IMN logo majestic logo threadwatch logo seochat tools logo