change the event implements of the widget.