Very simple question... But I'm too stupid to figure it out

I have a WxPython form. On it is a textctrl called “status_edt” and a button. When I click the button, this code fires off :

text = ‘Hello World’
self.status_edt.SetValue(text)

It works to the point where it sets the value of the textctrl to “Hello World” - that is great… But then it simply stops accepting any other clicks on the form (Even the “X” to close it does nothing…).

In another spot on the form, I have another editctrl called “filename_edt” and a button. When the button is clicked it executes this :

self.filename_edt.SetValue(wx.FileSelector())

and that works perfectly - opens a file browser and when a filenname is chosen it populates it’s edit box and then proceeds to wait for other mouse clicks - it doesn’t have the same problem… When I execute that code for “status_edt” it does the same thing… The problem only rears it’s head when I try to put a string in an edit box (Which sort of seems like it should be the reason for the existence of edit boxes…).

Any ideas out there? Thanks in advance…

Timothy,

Timothy Collins wrote:

I have a WxPython form. On it is a textctrl called "status_edt" and a button. When I click the button, this code fires off :

text = 'Hello World'
self.status_edt.SetValue(text)

It works to the point where it sets the value of the textctrl to "Hello World" - that is great... But then it simply stops accepting any other clicks on the form (Even the "X" to close it does nothing...).

In another spot on the form, I have another editctrl called "filename_edt" and a button. When the button is clicked it executes this :

self.filename_edt.SetValue(wx.FileSelector())

and that works perfectly - opens a file browser and when a filenname is chosen it populates it's edit box and then proceeds to wait for other mouse clicks - it doesn't have the same problem.... When I execute that code for "status_edt" it does the same thing... The problem only rears it's head when I try to put a string in an edit box (Which sort of seems like it should be the reason for the existence of edit boxes...).

Any ideas out there? Thanks in advance...

Sorry, no ideas. But maybe if you post the script so one can run it I am sure that someone will be able to help.

Werner

Hi Tim,
Are you sure is the text editor? everything works OK if you comment
the SetValue line?

From my experience, the kind of behavior that you describe is

associated with not skipping an event (evt.Skip()) when I should
have...

Peter

···

On Wed, Feb 25, 2009 at 9:28 PM, Timothy Collins <wookietim@gmail.com> wrote:

Any ideas out there? Thanks in advance...

--
There is NO FATE, we are the creators.
blog: http://damoc.ro/

It turns out that I had to attach the code to the button event rather than the left mouse button up event…

···

On Fri, Feb 27, 2009 at 9:17 AM, Peter Damoc pdamoc@gmail.com wrote:

Hi Tim,

Are you sure is the text editor? everything works OK if you comment

the SetValue line?

From my experience, the kind of behavior that you describe is

associated with not skipping an event (evt.Skip()) when I should

have…

Peter

On Wed, Feb 25, 2009 at 9:28 PM, Timothy Collins wookietim@gmail.com wrote:

Any ideas out there? Thanks in advance…

There is NO FATE, we are the creators.

blog: http://damoc.ro/


wxpython-dev mailing list

wxpython-dev@lists.wxwidgets.org

http://lists.wxwidgets.org/mailman/listinfo/wxpython-dev