Different ways to capture textfield events