>I want to know if it possible to type for example FYI and get : For your
>information ?
>I want of course can customize this (can define my own list : FYI=For your
>information, etc ...).
Something like this can be done easily using the event
AfterCompleteWordEvent:
procedure TWordPadForm.WPRichText1AfterCompleteWordEvent(Sender:
TObject;
var lastchar: Char);
var s : string;
begin
if lastchar='+' then { Auto Words }
begin
s := WPRichText1.CPWord;
if CompareText(s, 'wp')=0 then
begin
WPRichText1.CPWord := 'WPTools'+#13+'The native Delphi
ExpressTexter';
lastchar := #0;
WPRichText1.Repaint;
end else if CompareText(s, 'pic')=0 then
begin
WPRichText1.CPWord := '';
TestObject1Click(nil);
lastchar := #0;
WPRichText1.Repaint;
end;
end else if lastchar in [#32,#9] then { Quick Correct }
begin
s := WPRichText1.CPWord;
if s='teh' then WPRichText1.CPWord :='the';
end;
end;
The example above uses '+' to select a macro!