From: Bryan B. <br...@bu...> - 2004-05-06 21:00:11
|
> I have added Clicked event to wx.Button. An example how to use it is > in the changed Controls sample. > > How about implementing other events this way without loosing the > possibility to use the old way with EVT_BUTTON for example ??? This seems like an excellent way of using .NET events... However, there is one disadvantage. If you try adding a handler more than once, only the last handler added gets called. For example: Clicked += new EventListener(Test); Clicked += new EventListener(Test2); When the event is triggered, only 'Test2' will get called. The same disadvantage exists with the existing event system. Nonetheless, the solution to the mentioned problem exists deeper in the code, and I think we can go with your method for now. Cheers. -- Bryan Bulten http://www.bulten.ca/ http://wxnet.sourceforge.net/ |