如何在richedit中一行字显示不同的颜色 比如:richedit1.line.add('赤橙黄绿青蓝紫');如何分别显示他们的颜色,“赤”是红色的,“橙”是橙色的......如果不行,有什么第三方控键可以做到。如何安装? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 用Riched20.dll生写richedit控件吧。还可以看盾rxLib2.75里面的东西怎么样。 RichEdit1.Clear; RichEdit1.Lines.Add('赤橙黄绿青蓝紫'); with richedit1 do begin SelStart :=0; SelLength := 2; SelAttributes.Color := clRed; SelStart :=2; SelLength := 2; SelAttributes.Color := clYellow;//自己找橙色 SelStart :=4; SelLength := 2; SelAttributes.Color := clYellow; SelStart :=6; SelLength := 2; SelAttributes.Color := clGreen; SelStart :=8; SelLength := 2; SelAttributes.Color := clTeal; SelStart :=10; SelLength := 2; SelAttributes.Color := clBlue; SelStart :=8; SelLength := 2; SelAttributes.Color := clFuchsia; end; RichEdit1.SelStart:=0; RichEdit1.SelLength:=5; RichEdit1.SelAttributes.Color:=clRed; RichEdit1.SelLength:=0; 超长整形怎么运算? EnumChildWindows函数使用问题 界面开发 想做一个尝试可没有题材,有经验的帮忙说说~新人都可以进来看看~大家一起讨论 以前在delphi6中的fastnet里的nmhttp,nmftp,nmudp,nmstmp,nmpop3都对应于delphi7中indy的哪此控件啊? 在delphi中下面第6行中a,b 为变量,这样写有没有错误?在线等待 谈ClientDataSet控件在二层中的用途,请指教! 急急急!!!!!!关于多表的数据修改问题。 帐号 关于MTS的OleVariant Module模块的问题 ole嵌入word执行总是不正常!急!急!急!
还可以看盾rxLib2.75里面的东西怎么样。
RichEdit1.Lines.Add('赤橙黄绿青蓝紫');
with richedit1 do
begin
SelStart :=0;
SelLength := 2;
SelAttributes.Color := clRed;
SelStart :=2;
SelLength := 2;
SelAttributes.Color := clYellow;//自己找橙色
SelStart :=4;
SelLength := 2;
SelAttributes.Color := clYellow;
SelStart :=6;
SelLength := 2;
SelAttributes.Color := clGreen;
SelStart :=8;
SelLength := 2;
SelAttributes.Color := clTeal;
SelStart :=10;
SelLength := 2;
SelAttributes.Color := clBlue;
SelStart :=8;
SelLength := 2;
SelAttributes.Color := clFuchsia;
end;
RichEdit1.SelLength:=5;
RichEdit1.SelAttributes.Color:=clRed;
RichEdit1.SelLength:=0;