Changing fonts in richedit.


I'm trying to make an editor that makes the font bold if certain words are
typed in. Just like Delphi's own editor.
If a user types "procedure" then the font should become bold.

Has anyone got an idea how to do this, or if there exists a
component (freeware, shareware, commercial) ?

I have tried using selecttext and then change the selected text, but this
looks horrible.