Вниз
Скачать: CL | DM;

Подсветка в TRichEdit   Найти похожие ветки 

 
Stas ©   (2003-10-17 09:58) [0]

Есть ли у кого нибудь примеры подсветки в TRichEdit ?
Или описание принципа действия ?


 
MBo ©   (2003-10-17 09:59) [1]

SelStart SelLength SelAttributes


 
Stas ©   (2003-10-17 10:05) [2]

Я делаю так, но при вводе текста, заметно мерцание.

Procedure ReColor (RichEdit:TRichEdit);
var i,j,n,k:Integer; Text:WideString;
begin
k:=RichEdit.SelStart;
Richedit.SelectAll;
richedit.SelAttributes.Color:=clblack;
text:=UPPERCASE(RichEdit.Text);
for j:=1 to ColorCount do
begin
for i:=1 to WordCount do
begin
n:=pos (ColorWord[j,i],text);
if n<>0 then
begin
RichEdit.SelStart:=n-1;
RichEdit.SelLength:=Length(ColorWord[j,i]);
RichEdit.SelAttributes.Color:=tlColor[j];
end;
end;
end;
RichEdit.SelStart:=k;
RichEdit.SelLength:=0;
RichEdit.SelAttributes.Color:=clBlack;
end;


 
MBo ©   (2003-10-17 10:20) [3]

lines.beginupdate/endupdate попробуй


 
Stas ©   (2003-10-17 10:23) [4]

Спасибо !
Сейчас попробую


 
Stas ©   (2003-10-17 10:24) [5]

Работает нормально !



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.45 MB
Время: 0.014 c
1-89392
Oleg Barsky
2003-10-15 15:06
2003.10.27
Какой ASCII-код у клавиши TAB?


14-89481
Knight
2003-10-06 23:53
2003.10.27
Первая сотня!!!


1-89204
имя
2003-10-15 14:37
2003.10.27
Lam


11-89193
Юрец
2003-02-09 16:06
2003.10.27
KOL.mastak.ru


1-89290
REA
2003-10-14 10:19
2003.10.27
Ole Document




   Наверх