How notify something has changed ?

I have also a few general questions about wx: * Can i emit Events ?

Yes, but the event won't be reverse-translated and sent to the native control, it will only go to any handlers bound with EVT_XXX. Just create the event object and then do this:

  window.GetEventHandler().ProcessEvent(event)

Event are connected by: EVT_XXX(ID, Function). * How can i send my own parameter to the callbackfunction ?

You can't, at least not without a little Python magic... You can write a class that dyanimcally wraps around your callback and then calls it with the extra parameters when the event happens. First say "Hocus Pocus" and then do something like this:

class CallWithExtraParameters:
  def __init__(self, callable, *args, **kw):
    self.callable = callable
    self.args = args
    self.kw = kw
  def __call__(self, event):
    self.callable(event, *self.args, **self.kw)

EVT_BUTTON(self,
  btn.GetId(),
  CallWithExtraParameters(self.OnClick, 123, foo="bar"))

···

Martin.Zohlhuber@tttech.com wrote:

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!