How to handle changing address events in IpAddrCtrl widget?

I have the following
problem: OnTextEnterEvt method doesn’t called when
i press enter inmasked.IpAddrCtrl widget. This is part of my
code:

    ...
    self.address_field = masked.IpAddrCtrl(<s>self</s>.panel, style=wx.TE_PROCESS_ENTER)
    self.address_field.Bind(wx.EVT_TEXT_ENTER, self.OnTextEnterEvt)
    ...

def OnTextEnterEvt(self, event):
    print 'OnTextEnterEvt'

When i handle wx.EVT_TEXT all ok. What’s the
problem?

Another question : what’s the event is emitted
when i editing masked.IpAddrCtrl ,
but not emitted when method SetValue is called. In other words,
i want the event for masked.IpAddrCtrl that is emitted when there
is any changes in this widget, but not emitted
when SetValue is called.

Mind Mixer wrote:

I have the following problem:|OnTextEnterEvt|method doesn't called when
i press enter in|masked.IpAddrCtrl|widget. This is part of my code:

> ...
     self.address_field= masked.IpAddrCtrl(self.panel, style=wx.TE_PROCESS_ENTER)
     self.address_field.Bind(wx.EVT_TEXT_ENTER, self.OnTextEnterEvt)
     ...

def OnTextEnterEvt(self, event):
     print 'OnTextEnterEvt' |

When i handle|wx.EVT_TEXT|all ok. What's the problem?

Try adding the wx.WANTS_CHARS style too, and don't forget the wx.TE_PROCESS_TAB style that the masked controls use by default.

/Another question/: what's the event is emitted when i
editing>masked.IpAddrCtrl|, but not emitted when method|SetValue|is
called. In other words, i want the event for|masked.IpAddrCtrl|that is
emitted when there is any changes in this widget, but*not*emitted
when>SetValue>is called.

Use ChangeValue instead of SetValue.

···

--
Robin Dunn
Software Craftsman