P peter93 Member Licensed User Longtime User Sep 30, 2022 #1 How to recover the clear button event in a B4XFloatTextField.
P PaulMeuris Well-Known Member Licensed User Oct 1, 2022 #2 What do you want to do? Can you be more specific? Maybe some sample code? Upvote 0
P peter93 Member Licensed User Longtime User Oct 1, 2022 #3 The text field of a B4BFloatTextfield has three optional buttons accept button, clear button and reveal button. The event for accept button is EnterPressed, for reveal button it is PasswordRevealChanged but there is nothing for clear button. Upvote 0
The text field of a B4BFloatTextfield has three optional buttons accept button, clear button and reveal button. The event for accept button is EnterPressed, for reveal button it is PasswordRevealChanged but there is nothing for clear button.
P PaulMeuris Well-Known Member Licensed User Oct 2, 2022 #4 You are right, there isn't a specific event for the clear button. The other 2 events you didn't mention are: FocusChanged and TextChanged. Interesting thing to notice is that the TextChanged event holds a reference "Old" to the text that was in the textfield after the field was cleared. A call to the public method setText("") clears the textfield or setting the B4XFloatTextField.text property = "" also clears the textfield. Upvote 0
You are right, there isn't a specific event for the clear button. The other 2 events you didn't mention are: FocusChanged and TextChanged. Interesting thing to notice is that the TextChanged event holds a reference "Old" to the text that was in the textfield after the field was cleared. A call to the public method setText("") clears the textfield or setting the B4XFloatTextField.text property = "" also clears the textfield.
Erel B4X founder Staff member Licensed User Longtime User Oct 2, 2022 #5 You can indeed use the TextChanged event to find it. Upvote 0
P peter93 Member Licensed User Longtime User Oct 2, 2022 #6 it was obvious but I didn't think about it. Thanks to Paul and Erel. Upvote 0