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 8266211
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T05:04:32+00:00 2026-06-08T05:04:32+00:00

I have a stack of Frames like this: +–+ | | +-+–+-+ | |

  • 0

I have a stack of Frames like this:

    +--+
    |  |
  +-+--+-+
  |      |
+-+------+-+
|          |
+----------+

But I want them like this:

        +--+
        |  |
    +---+--+
    |      |
+---+------+
|          |
+----------+

What is the best way to do this?

Was using pack and couldn’t get them to behave right. For some reason, using grid didn’t display them at all and my program hangs

# Main script
root = Tk()
root.geometry('500x500')
for task in TaskList:
    GuiTools.TaskBox.TaskBox(root, task)
root.mainloop() # program hangs from this line, to the point of having to use kill to close it



# Taskbox class
class Taskbox(master, task):
    __init__(self)
        self.TaskFrame = Frame(master, borderwidth=3, relief=RAISED)
         . . .
        Putting stuff in frame
         . . .
        self.TaskFrame.pack() # Gives result 1
        #self.TaskFrame.grid(column=1, sticky='ne') # no display, causes hang
  • 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-06-08T05:04:35+00:00Added an answer on June 8, 2026 at 5:04 am

    This is a bit tricky to answer without knowing what you’re putting into the frames in the first place. @sc0tt is correct that you probably want to use sticky=tk.E, however, that might not be good enough to get what you want since your frames will likely resize themselves depending on what you put in them (unless you do myframe.grid_propagate(False)). The solution to this is to put in the columnspan keyword as well.

    Here’s a stupid loop which will do something like what you want:

    import Tkinter as tk
    root = tk.Tk()
    frames = []
    for i in range(3):
        f = tk.Frame(root)
        f.grid(row=i, column=0, columnspan=i+1, sticky=tk.E)
        frames.append(f)
    
    #Now, you can add buffer spaces (frames) into the grid at 
    # `row=0,column=0`, `row=0,column=1` and `row=1,column=1` if you need it. 
    
    root.mainloop()
    

    This effectively partitions your grid like this:

    +----+-----+-----+
    |    |     |     |
    +----+-----+-----+
    |    |           |
    +----+-----------+
    |                |
    +----------------+
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a stack trace that looks like this: #3 0x00007fffde86c206 in GetMedia (p_ml=0xb91560,
I know frames are bad. However I have to stick with them a little
i have a stack of messages in database table. i want to send these
I have a stack which contains some integer data. I want to find out
I have view stack in a app like so: <mx:ViewStack id=viewStack left=0 right=0 top=0
Is there a way to view stack elements like un-assigned return values or exceptions
I have a memory leak while using NSFetchedResultsController objectAtIndex: The stack frame is as
I have a Linux x86-32 GAS assembly program terminating like this: movl $1, %eax
I get this crash report when I run java bean of my project using
I'd like to create a webpage which looks like this: https://i.stack.imgur.com/GYEis.png I can't use

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.