Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2005.01.30;
Скачать: CL | DM;

Вниз

Компонент   Найти похожие ветки 

 
Ivolg   (2005-01-16 12:48) [0]

Всем привет!! Подскажите пожайлусто компонент типа Memo или RichEdit"a ,только чтобы у каждой строчки текста можно было менять цвет!!!  СПАСИБО!!!!


 
Fay ©   (2005-01-16 13:03) [1]

Ivolg   (16.01.05 12:48)
Тогда уж пайжойлуйсто 8)


 
Ivolg   (2005-01-16 17:09) [2]

Капец!!! чё не кто незнат! Помню сто раз натыкался на подобный вопрос в форуме, ну тогда он был мне не к чему!!


 
remb   (2005-01-16 17:15) [3]

asvt   (21.12.04 13:03) [2]

Procedure TForm1.ListBox1DrawItem(Control: TWinControl; Index: Integer;
Rect: TRect; State: TOwnerDrawState);
begin
with TListBox(Control).Canvas do begin
  if odSelected In State then begin
    Brush.Color := clBlack;// Выделение черным
    Font.Color := clWhite;
  end
  else
    case index mod 4 of //четыре строки с чередованием
      0: begin
           Brush.Color := clRed;
           Font.Color := clWhite;
         end;
      1: begin
           Brush.Color := clAqua;
           Font.Color := clBlack;
         end;
      2: begin
           Brush.Color := clYellow;
           Font.Color := clBlack;
         end;
      3: begin
           Brush.Color := clLime;
           Font.Color := clBlack;
         end;
    end; { Case }

  FillRect(Rect);
  TextOut(Rect.Left +2, Rect.Top, TListBox(Control).Items[Index]);

  If odFocused In State Then Begin
    InflateRect(Rect, -1, -1);
    DrawFocusRect(Rect);
  End;  
End;
end;
procedure TForm1.ListBox1MeasureItem(Control: TWinControl; Index: Integer;
var Height: Integer);
begin
Height := (Control As TListbox).ItemHeight + 2;
end;


 
Ivolg   (2005-01-17 14:22) [4]

Спасибо!



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

Текущий архив: 2005.01.30;
Скачать: CL | DM;

Наверх




Память: 0.47 MB
Время: 0.038 c
9-1098387885
OranZevjii
2004-10-21 23:44
2005.01.30
Вывод спрайтов


1-1105716876
race1
2005-01-14 18:34
2005.01.30
действия и свойства


14-1105615269
AndB
2005-01-13 14:21
2005.01.30
E-BUKI


14-1105435700
Ozone
2005-01-11 12:28
2005.01.30
Как узнать модель телефона.


3-1104164186
juice
2004-12-27 19:16
2005.01.30
TQuickReport