Conditional to check if user pressed SearchField Clear button

Hi,

How can I create a conditional to check if user pressed the SearchField Clear button?

I’ve a code in pressed event handler and I want to avoid the execution of this code if user pressed this button.

Thank you for all help!

Maybe combination of SearchField.Pressed and Searchfield.MouseMove?!
https://documentation.xojo.com/api/deprecated/searchfield.html#searchfield-pressed
MouseMove can track the area and set a Boolean Property and Pressed-Event can handle this.

I’ve solved using

if field.Text = “” Then

Thank you.