label edit end emits window destroy

Hello,
using a ListCtrl with label editing enabled, I noticed that when is
emitted wx.EVT_LIST_END_LABEL_EDIT also wx.EVT_WINDOW_DESTROY is
emitted, so my application is confused. Is that normal, can be avoided?
Thanks in advance for any help.

Fabrizio

Hello,

···

On Jan 16, 2009, at 5:11 AM, Fabrizio Pollastri wrote:

Hello,
using a ListCtrl with label editing enabled, I noticed that when is
emitted wx.EVT_LIST_END_LABEL_EDIT also wx.EVT_WINDOW_DESTROY is
emitted, so my application is confused. Is that normal, can be avoided?
Thanks in advance for any help.

The destroy event must be coming from the text control that is shown when you edit a label. You should be able to check the events properties (i.e ID, EventObject, etc..) to tell what was destroyed and act accordingly.

Cody

You could avoid this (and other difficulties) with an ObjectListView:
http://objectlistview.sourceforge.net/python

···

------------------------------------------------------------------------
Phillip Piper www.bigfoot.com/~phillip_piper phillip_piper@bigfoot.com
A man's life does not consist in the abundance of his possessions

-----Original Message-----
From: wxpython-users-bounces@lists.wxwidgets.org
[mailto:wxpython-users-bounces@lists.wxwidgets.org] On Behalf Of Fabrizio
Pollastri
Sent: Friday, 16 January 2009 1:11 PM
To: wxpython-users@lists.wxwidgets.org
Subject: [wxpython-users] label edit end emits window destroy

Hello,
using a ListCtrl with label editing enabled, I noticed that when is
emitted wx.EVT_LIST_END_LABEL_EDIT also wx.EVT_WINDOW_DESTROY is
emitted, so my application is confused. Is that normal, can be avoided?
Thanks in advance for any help.

Fabrizio
_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users