Hello. I am getting mixed results when searching for the same word in a richviewedit control. My code does this:
loop through a dataset and with each iteration
clear and load a richviewedit from a blob field.
richviewedit->format();
richviewedit->SetSelectionBounds(0,richviewedit(0,richviewedit->GetOffsBeforeItem(0),0,richviewedit->GetOffsBeforeItem(0));
if (richviewedit->SearchText("DIAGNOSIS:", TRVESearchOptions() <<
rvseoMatchCase << rvseoDown)) {
...do something
}
The word DIAGNOSIS: is in each of the fields but the program only finds it sometimes. I can't figure it out. Richview 11 on bcb2007. I have tried all TRVESearchOptions as well as SearchTextA and W and still cannot get a consistent return of true from the if statement. Please help. Thanks.
RichViewEdit->SearchText Not finding word
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
This is an old version, and (as far as I remember) rvseoMultiItem was implemented later.
Without this option, SearhText searches for the substring in each text item separately. So it cannot find a substring if is a part of two or more different text items (for example, if it is written using different fonts).
I suggest to upgrade to the new version.
Without this option, SearhText searches for the substring in each text item separately. So it cannot find a substring if is a part of two or more different text items (for example, if it is written using different fonts).
I suggest to upgrade to the new version.