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

The Archive Base Latest Questions

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

I have made a small app with a GUI in python using the wxpython

  • 0

I have made a small app with a GUI in python using the wxpython toolkit. It consists of a frame as the top window and 100 StaticText child widgets. I have bind their size events (wx.EVT_SIZE) to a OnResize function which changes their font according to the size of the StaticText widgets. (This helps to increase or decrease the size of the font of the widgets when I resize my frame window accordingly at runtime.)

Now the poblem is that the OnResize function gets called 4 times every time I resize my frame. This considerably slowsdown the startup of my app (and also its resizing.) What I want is that the OnResize function must get called only once.

Is this possible in any way?

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

    Consider an alternative approach.

    Keep a variable of the previously processed size. Then, in your size handler, only change the font size if the size of the widget actually changed since the last size event.

    def OnResize(self, event):
        w, h = size = self.GetSize()
        if size != self.previous_size:
            # update font size
        self.previous_size = size
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have just made a small little app of a Python wxPython script with
I have made an update on Google App Engine with a small fix and
I have made small web-app in jsp with a start page with login and
I've made a small web app using web.py that I now want to put
I have made a small test app with a button and a UISlider. Touching
In the bug fixing of a small ASP.NET/C# web app I have made, I
I have made a small Java .jar GUI application. When I run it on
Possible Duplicate: What is object serialization? I've made a small RSS Reader app using
I've made a small app where Form is threaded (using BackgroundWorker ), and in
I have made small app for Android mobile. In one situation I am not

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.