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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T08:02:35+00:00 2026-05-12T08:02:35+00:00

I am having an issue with wxPython toolkit. I am using a wx.GridSizer object

  • 0

I am having an issue with wxPython toolkit. I am using a wx.GridSizer object to place a grid displaying some status info. I need to update this grid, and so I came up with a few different ways of doing it. The one I prefer is to simply refresh/update the text that needs the updating, so I could try detaching the wxStaticText object from the sizer, overwriting it with a new wxStaticText object, and inserting the object back into the sizer at its previous index.

The better way, is to use the parent class of wxGridSizer,wxSizer, which has a method called ‘Replace’ which will allow me to replace the item in the widget without taking it out, and inserting it back in. Much more slick no? Well I get a very odd error when attempting to use this method. Here is code followed by error:

    self.info_sizer.Replace(self.project_value, wx.StaticText(self, wx.ID_ANY, project))

    self.info_sizer.Replace(self.project_value, wx.StaticText(self, wx.ID_ANY, project))
AttributeError: 'GridSizer' object has no attribute 'Replace'

So suddenly Replace is not an option. Bear in mind that the Insert method I refered to earlier is a method of the sizer’s parent class wxSizer. So there proves that the sizer im using, wxGridSizer, can successfully call its parent class’s method (inherited, subclassed) Insert.

So why cant I call in a similar way the method Replace?

  • 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-12T08:02:36+00:00Added an answer on May 12, 2026 at 8:02 am

    Any reason you can’t use wx.StaticText.SetLabel("New label") to update the text?

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

Sidebar

Ask A Question

Stats

  • Questions 226k
  • Answers 226k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Take a look at the Hijax technique, it's a way… May 13, 2026 at 1:14 am
  • Editorial Team
    Editorial Team added an answer You can put the following in your base panel class… May 13, 2026 at 1:14 am
  • Editorial Team
    Editorial Team added an answer It really depends on what webservice architecture you are talking… May 13, 2026 at 1:14 am

Related Questions

I have a little logging app (written in wxPython) that receives data from a
I am having an issue with my javascript files in a master page ...
I am having an issue with the Microsoft Visual Sourcesafe command line options that
I am having an issue with a custom control rendering its contents (child controls)

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.