greogory51100
Messages postés1Date d'inscriptiondimanche 4 juin 2023StatutMembreDernière intervention 4 juin 2023
-
4 juin 2023 à 16:24
Bonjour,
Comment pouvons-nous mettre à jour le TRichEdit SpellChecking ?
{ OptSpellChecking Click }
procedure TForm1.OptSpellCheckingClick(Sender: TObject);
begin
OptSpellChecking.Checked := not OptSpellChecking.Checked;
RichEdit.SpellChecking := OptSpellChecking.Checked;
RichEdit.Update;
end;
J'ai cherché dans l'unité Vcl.ComCtrls ou ce trouve la (property SpellChecking;) qui elle renvoi vers cette procédure :
procedure TCustomRichEdit.DoEnableSpellChecking;
begin
if HandleAllocated then
begin
// Ref: https://docs.microsoft.com/en-us/archive/blogs/murrays/richedit-spell-checking-autocorrection-and-prediction
SendMessage(Handle, EM_SETLANGOPTIONS, 0, IMF_SPELLCHECKING);
SendMessage(Handle, EM_SETEDITSTYLE,
SES_USECTF or SES_CTFALLOWEMBED or SES_CTFALLOWSMARTTAG or SES_CTFALLOWPROOFING,
SES_USECTF or SES_CTFALLOWEMBED or SES_CTFALLOWSMARTTAG or SES_CTFALLOWPROOFING);
end;
end;
Cette procédure permet activé le SpellChecking du TRichEdit.
Mes impossible de mètre à jour le SpellChecking sur le TRichEdit.
Pour être plus claire j'aimerai afficher toute les erreurs de Texte du RichEdit.