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

  • SEARCH
  • Home
  • 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 8207927
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T09:09:52+00:00 2026-06-07T09:09:52+00:00

If I have several rows and columns with several entry/label widgets in the SAME

  • 0

If I have several rows and columns with several entry/label widgets in the SAME frame, is it possible to choose just a single one of them and delete it whilst leaving the others alone.

e.g.

class Window():
    def __init__(self):
        self.root = Tk()
        self.win1 = Frame(self.root)
        entry1 = Entry(win1, row=1, column=1)
        entry2 = Entry(win1, row=1, column=2)
        label1 = Label(win1, row=1, column=3)

    def main1(self):
        label2 = Label(win1, row=1, column=4)
        labeln = Label(win1, row=1, column=n)

I would then like to remove from column 3 onwards, where n could be a random number. Is it possible to get grid_forget and insert the number of columns? Is it also possible for the rows as well?

UPDATE: OR is it possible to simply return back to the window created under init and delete those created under main1 (but have been created in the same frame)?

Thank you.

  • 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-07T09:09:54+00:00Added an answer on June 7, 2026 at 9:09 am

    Read up on the grid_remove and grid_forget methods; these will alow you to remove existing widgets from view. You can also destroy widgets, causing them to vanish.

    It’s been a while since I’ve done this (and don’t currently have a computer on which to create an example), but I think the one sticky point may be that you will have to go in and explicitly set the grid row and/or column heights, widths or weights back to zero to reclaim the space. It’s quite doable though.

    Your other choice is to create all of your widgets via a method or function. You can then pretty easily destroy and recreate all the widgets. This is probably less pleasant for the user since the whole UI will “blink”.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a DataGridView with several columns and several rows of data. One of
I have a table with several hundred million rows. One of the columns is
Weird to describe but here goes. I have a table with several rows. One
I have a HTML table with several columns and several rows. The last row
Table1 has columns (id, a, b, c, group). There are several rows that have
i have a grid divided into several rows/columns, how can i get the canvas
I have got a table with several rows and columns. I have a span
I have several excel files carrying 90 columns and about 500 rows, each file
I have a query which returns 644 rows, grouped by several columns. I need
WPF, C#, I have a datagrid with several columns, many rows. I want each

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.