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

Работа с RichEdit   Найти похожие ветки 

 
netboy   (2005-11-06 13:07) [0]

Здраствуйте! Как сделать нормальную подсветку html - тегов (без глюков)
В моём коде есть глюк : При нажатие Enter каретка идёт вниз, а когда я её подымаю
стрелкой вверх она упраямо опускается в самый низ.
И где можно найти статьи по работе с RichEdit?

Код:----------------------------------------------

procedure HTML(RichEdit: TRichEdit; TextCol : Tcolor);
var
 i, iDop: Integer;
 s: string;
 Col: TColor;

begin

 Col := TextCol;
 RichEdit.SetFocus;

 for i := 0 to Length(RichEdit.Text) do
 begin

   RichEdit.SelStart := i;
   RichEdit.SelLength := 1;
   s := RichEdit.SelText;

   if s = "{" then begin col := cllime end else
   if s = "}" then begin col := clblue end else
   if s = "<" then begin col := clred end else
   if s = ">" then begin col := clred end else
   // .............
    Col := TextCol;

   RichEdit.SelAttributes.Color := Col;
 end;
RichEdit.SelLength := 0;
end;

procedure TForm1.RichEdit1KeyUp(Sender: TObject; var Key: Word;
 Shift: TShiftState);
begin
RichEdit1.Lines.BeginUpdate;
HTML(RichEdit1,clblack);
RichEdit1.Lines.EndUpdate;
end;

-----------------------------------------------------------


 
netboy   (2005-11-07 19:11) [1]

Программисты помогите !!!



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

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



Память: 0.45 MB
Время: 0.027 c
2-1131624440
ВоваВова
2005-11-10 15:07
2005.11.27
Запуск программы в одном экземпляре


2-1131275441
zaN0za
2005-11-06 14:10
2005.11.27
Integer->PChar->Integer. как?


6-1123138472
The Phantom of The Opera
2005-08-04 10:54
2005.11.27
Скачивание с докачкой


2-1131520942
OtherRelax
2005-11-09 10:22
2005.11.27
hInstance


2-1131802914
ЯТутаНовичек
2005-11-12 16:41
2005.11.27
Создание сообщения Outlook в delphi




   Наверх