Home > Back-end >  How to get the color of the font properties every word in the richedit
How to get the color of the font properties every word in the richedit

Time:10-13

Use the richedit controls access to the inside each word attribute (colors, fonts)
, using this method: each time you select a text)
For I:=1 to Length (RichEdit1 txet) do
The begin
Form1. RichEdit1. SelStart:=I - 1;
Form1. RichEdit1. SelLength:=1;//each time you select a
FontColor [I] :=form1. RichEdit1. SelAttributes. Color;
Fontsize [I] :=form1. RichEdit1. SelAttributes. Size;
Form1. RichEdit1. SelLength:=0;//release the selected
end;
But it always beating in the edit box the cursor, the cursor from the beginning to the end of flash down
, obviously bad,
Seek other way

CodePudding user response:

Can try hides the cursor when the operation, the operation recovery after the cursor shows

HideCaret (rrichedit1. Handle);
.
ShowCaret (rrichedit1. Handle);

CodePudding user response:

  • Related