How to receive tab control event in Python mode