怎样改变Richedit中某一行的字体或某一行的颜色

var 
Y: Integer; 
begin 
Y := 1; 
// if Y < 0 then Exit;//安全检查 
// if Y >= RichEdit1.Lines.Count then Exit;//安全检查 
RichEdit1.CaretPos := Point(0, Y); 
RichEdit1.SelLength := Length(RichEdit1.Lines[Y]); 
RichEdit1.SelAttributes.Color := clRed; 
end;

posted @ 2013-04-29 13:02  小天1981  阅读(590)  评论(0编辑  收藏  举报