Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.052 X-Spam-Evidence: '*H*': 0.90; '*S*': 0.00; 'url:sourceforge': 0.02; 'wxpython': 0.07; 'python': 0.08; 'proceeding': 0.09; 'def': 0.15; '#call': 0.16; 'performed.': 0.16; 'received:mindspring.com': 0.16; 'x-mailer:apple mail (2.1084)': 0.16; 'wrote:': 0.16; 'this?': 0.21; "doesn't": 0.22; 'header:In-Reply-To:1': 0.22; 'pm,': 0.24; 'changed': 0.24; 'aug': 0.24; 'subject:change': 0.24; 'performing': 0.26; 'suggestion': 0.26; 'function': 0.27; 'installation': 0.30; 'url:downloads': 0.32; 'received:24': 0.32; 'does': 0.32; 'to:addr:python-list': 0.33; 'list.': 0.35; 'charset :us-ascii': 0.36; 'doing': 0.36; 'skip:" 10': 0.36; 'some': 0.38; 'subject:: ': 0.39; 'suggestions': 0.39; 'version:': 0.39; 'header :Mime-Version:1': 0.39; 'to:addr:python.org': 0.39; 'mailing': 0.39; 'url:net': 0.60; 'header:Message-Id:1': 0.61; 'back': 0.62; 'here': 0.65; 'luck': 0.68; 'subject:!!!': 0.76; '#1:': 0.84; '#2:': 0.84; '2.7.1': 0.84; '[url=': 0.84; 'received:69.73': 0.84; 'skip:w 60': 0.84 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1084) Subject: Re: Button Label change on EVT_BUTTON in wxpython!!! From: Philip Semanchuk In-Reply-To: Date: Sun, 28 Aug 2011 22:34:49 -0400 Content-Transfer-Encoding: quoted-printable References: To: python-list list X-Mailer: Apple Mail (2.1084) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - deimos.nocdirect.com X-AntiAbuse: Original Domain - python.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - semanchuk.com X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 37 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1314585301 news.xs4all.nl 2443 [2001:888:2000:d::a6]:46846 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:12375 On Aug 28, 2011, at 9:30 PM, Ven wrote: > Some system info before proceeding further: >=20 > Platform: Mac OS X 10.7.1 > Python Version: ActiveState Python 2.7.1 > wxPython Version: [url=3Dhttp://downloads.sourceforge.net/wxpython/ > wxPython2.9-osx-2.9.2.1-cocoa-py2.7.dmg]wxPython2.9-osx-cocoa-py2.7[/ > url] >=20 > I want the button label to be changed while performing a task >=20 > So, here is what I did/want: >=20 > self.run_button=3Dwx.Button(self.panel,ID_RUN_BUTTON,label=3D'Install') > self.Bind(wx.EVT_BUTTON, self.OnRun,id=3DID_RUN_BUTTON) >=20 > def OnRun(self,evt): > self.run_button.SetLabel('Installing..') > #call a function that does the installation task > installation_task() > #After task completion, set the button label back to "Install" > self.run_button.SetLabel('Install') >=20 > When I try doing this, it doesn't set the label to "Installing" while > the task is being performed. Any suggestions how do I achieve this? Suggestion #1: After you set the label to "Installing...", try adding = self.run_button.Refresh() and/or self.run_button.Update(). Suggestion #2: Ask wxPython questions on the wxPython mailing list. Good luck Philip