62872 - SearchField Enhancement

Feedback Case Number: 62872

Mike Cotrone wrote :

It would be awesome to have a SearchField.AddToRecentSearch() so we can manually add user typed strings (without pressing enter) to the recent searches.

And I added :

If an AddItemToRecentList is not possible, at least a method : MySearchField.Search which would be a RaiseEvent MySearchField.Pressed

1 Like

Let’s try to improve this :+1:

Hi @Thomas_ROBISSON

If you set the Text property, then the TextChanged will be raised and, thus, you will be able to do the search there.

Thank you, but I don’t understand what you mean.
To test, A added a button with in its action event :

MySearchField = "Toto"

Then it raise MySearchField.TextChanged but what to do there ?
I would like to do MySearchField.HitEnterKey in order to raise the MySearchField.Pressed event.

Once you set the code:

MySearchField.Text = "Toto"

The TextChanged event is fired (equivalent to Pressed); so you “should” write the logic of your particular search there… for example, filtering the entries in a related ListBox or something else.

Yes but what we want is not to launch the logic of our search, I can do it directly from my button. What we ask for is to add the text in the recent search.
Mike Cotrone asked for an instruction like :persevere:

MySearchField.AddRecentSearch "Toto"
MySearchField.AddRecentSearch "Donald"

I wrote, if at least a instruction like that is too hard to implement, add a MySearchField.Press which do the same thing as when we hit Return-Enter key.
Then a workaround could be :

MySearchField.Text "Toto"
MySearchField.Press
MySearchField.Text "Donald"
MySearchField.Press

And we can put a flag in the MySearchField.Pressed event in order to not do the search each time, and then only add the text in the recent search.

Ah, ok. The way I think it better fits is adding (and retrieving) the items directly to/from the list. :+1:

3 Likes