i've implemented find function on richeditbox when executed search query
, select found text inside richeditbox:
string^ doctext; currentricheditbox->document->gettext(text::textgetoptions::none, &doctext); start = currentricheditbox->document->selection->endposition; end = doctext->length(); int result = newrange->findtext(query, end-start, text::findoptions::none); if (result != 0) { currentricheditbox->document->selection->setrange(newrange->startposition, newrange->endposition); }
this kind of gets job done, overall subpar experience number of reasons:
the typical behavior of search not select found text. instead, when comparing against existing apps such microsoft edge or word, focus remains on search box instead of shifting result text found, allowing query repeated or modified.
a search should able highlight multiple results in text @ same time.
with style implementation, there no way enable instant search results update live while user types query.
how can implement search in uwp windows 10 app functions regular search function instead of selecting found text?
Comments
Post a Comment