Re: RichEdit and findText

new topic     » goto parent     » topic index » view thread      » older message » newer message

Pete wrote:
> 
>  Its late so I hope someone can supply the answer to my stupid question 
> while I sleep!!
>   I have a RichEdit in which I'm doing a findText. The findText works 
> fine when searching for a single character, but fails to find it if I am
> searching for more than one character..
> 
> i.e in the RichEdit I have "7028"
> 
> This works fine:-
>   fnd = findText ( RE, "7", {0,-1}, findDown)
> so does this
>   fnd = findText ( RE, "0", {0,-1}, findDown)
> but..
>   fnd = findText ( RE, "7028", {0,-1}, findDown)
> returns 0
>  Adding the findWholeWord flag also makes no difference..
> 
> I'm sure I'm doing something wrong but I can't see what.. Help!

I think I know the problem. Find the 'findText()' function in
the win32lib library and replace ...

    FT = struct_FINDTEXTEX( range[1], range[2], text, 0, 0 )

with ...

    FT = struct_FINDTEXTEX( range[1], range[2], text, 0, -1 )

-- 
Derek Parnell
Melbourne, Australia

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu