delphi - Remove highlight in RichEdit -
i using following code highlight selection of text in richedit.
procedure taformatmain.bthighlighttextclick(sender: tobject); const acolor = clyellow; var format: charformat2; begin fillchar(format, sizeof(format), 0); format begin cbsize := sizeof(format); dwmask := cfm_backcolor; crbackcolor := acolor; ried.perform(em_setcharformat, scf_selection, longint(@format)); end; ried.selstart := ried.selstart + ried.sellength; end;
can tell me how remove highlight or colour value "no colour" (equivalent no colour in microsoft word) be. not find relevant information topic on net.
to rest background color set:
format.dweffects := cfe_autobackcolor; format.dwmask := cfm_backcolor;
see also: charformat2 structure
Comments
Post a Comment