Page 1 of 1

SearchTextW that returns bounds or itemindex instead of selecting

Posted: Wed May 27, 2020 9:08 pm
by jgkoehn
Greetings Sergey,
Is there a SearchTextW or something similar that returns bounds instead of selecting. I am working on a search dialog that deals with formatting and other things. What I need to do basically is get the item in search bounds or its index and test it against various font styles etc.

Re: SearchTextW that returns bounds or itemindex instead of selecting

Posted: Thu May 28, 2020 7:54 am
by Sergey Tkachenko
Is the text formatted? Selection requires formatted document.

Re: SearchTextW that returns bounds or itemindex instead of selecting

Posted: Thu May 28, 2020 4:39 pm
by jgkoehn
It is formatted
SearchTextW is working well the only thing is I would like to not have to do RichViewEdit.Deselect is all instead I would rather know the bounds
StartItem, StartOffs, EndItem, EndOffs. If I do some more research I may be able to build this.

Re: SearchTextW that returns bounds or itemindex instead of selecting

Posted: Thu May 28, 2020 4:52 pm
by Sergey Tkachenko
Sorry, I misread the question.

Currently, SearchText can only select text. But I think it makes sense to add OnTextFound event, where you can do custom processing instead of selecting.
I'll include it in the next update (not in the today's update). Let me know if you need it urgently.

Re: SearchTextW that returns bounds or itemindex instead of selecting

Posted: Thu May 28, 2020 6:10 pm
by jgkoehn
Not urgent but it will help with a Search and Replace like MS Word has that is also format based. Thanks!

Re: SearchTextW that returns bounds or itemindex instead of selecting

Posted: Sat Jun 06, 2020 10:28 pm
by jgkoehn
Further info here?

Re: SearchTextW that returns bounds or itemindex instead of selecting

Posted: Mon Jun 08, 2020 12:54 pm
by Sergey Tkachenko
I implemented OnTextFound event. If you want, I can send changed files to you by email.
A release will be later.

Re: SearchTextW that returns bounds or itemindex instead of selecting

Posted: Mon Jun 08, 2020 2:18 pm
by jgkoehn
That would be great thank you if you send it by email

Re: SearchTextW that returns bounds or itemindex instead of selecting

Posted: Tue Jun 09, 2020 8:21 am
by Sergey Tkachenko
Sent