Or derive from the text edit and implement it directly in the class that gets the events.

Cheers,
_