Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6997617
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:18:22+00:00 2026-05-27T20:18:22+00:00

I just learned how to use tkinter in Python (3.2.2), and I’m having some

  • 0

I just learned how to use tkinter in Python (3.2.2), and I’m having some problem using the grid manager. When I put button.grid(sticky=SE), for example, the button is not being put in the bottom-right and is just being put in the upper-left, ignoring the sticky value. What am I doing wrong here? I tried to search it but I couldn’t really find out what I am doing wrong.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T20:18:23+00:00Added an answer on May 27, 2026 at 8:18 pm

    You probably need to set a minimum size for the widget containing the button.
    If you don’t, the container widget may shrink to occupy only the space required to display the button. If so, the sticky option will be meaningless since the container widget gives no space to show any difference.

    For example, using a tk.Frame as the container widget:

    import Tkinter as tk
    
    class SimpleApp(object):
        def __init__(self, master, **kwargs):
            title = kwargs.pop('title')
            frame = tk.Frame(master, borderwidth=5, bg = 'cyan', **kwargs)
            frame.grid()
            button = tk.Button(frame, text = title)
            button.grid(sticky = tk.SE)
            frame.rowconfigure('all', minsize = 200)
            frame.columnconfigure('all', minsize = 200)
    
    def basic():
        root = tk.Tk()
        app = SimpleApp(root, title = 'Hello, world')
        root.mainloop()
    basic()
    

    yields

    enter image description here


    PS. I don’t have tkinter installed in Python3.2 so I can’t test this, but I think the only change you need to make this work with Python3.2 is

    import tkinter as tk
    

    instead of

    import Tkinter as tk
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

as I've just learned in in my other question , I could use a
I have just learned how to use the SQLite database for local storage in
I just learned about jquery's .makeArray and I am trying to use JSON.stringify to
Having just learned that many cpp features (including the stl vector class) do not
I just learned that I could use chmod make myscript.sh executable and the run
I just learned ruby, and already have some html/javascript/css background. When i learn rails
I just barely learned how to use a function in parallel. The following line
I just learned to use salt and hash to secure the passwords in my
I use this syntax to open my files, since I learned that some years
I am new to cl, and I just learned to install packages using asdf-install,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.