| // Switch all the occurrences of "WinDev" found in a text in red and underlined I is int I = RTFSearch(EDT_Edit1, "WinDev") WHILE I>0 // Switch to red RTFSélection(EDT_Edit1, rtfColor, LightRed, I, 6) // Switch to underlined RTFSélection(EDT_Edit1, rtfUnderlined, True, I, 6) // find the next occurrence of "WinDev" I = RTFSearch(EDT_Edit1, "WinDev", rtfCaseSensitive, I+1) END
nRes is int sString is string = EDT_Edit1 // ****** USES A STRING VARIABLE // Find the words containing the string "RTF" nRes = RTFSearch(sString, "RTF", rtfFullWord, 1) WHILE nRes <> 0 nRes = RTFSearch(sString, "RTF", rtfFullWord, nRes+3)) END
|