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
Let’s try to improve this
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"
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
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 :
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.