procedure TForm1.ListBox1DrawItem(Control: TWinControl; Index: Integer;
Rect: TRect; State: TOwnerDrawState);
begin
With ListBox1 do begin
if odSelected in State then
Canvas.Brush.Color := clRed { <--- Теперь цвет highlighting-а будет красным }
else
Canvas.Brush.Color:=clWindow;
Canvas.FillRect(Rect);
Canvas.TextOut(Rect.Left+2,Rect.Top,Items[Index]);
end;
end;
With ListBox1 do begin
if odSelected in State then begin
Canvas.Brush.Color := clRed { <--- Òåïåðü öâåò highlighting-à áóäåò êðàñíûì }
end;
Canvas.FillRect(Rect);
Canvas.TextOut(Rect.Left+2,Rect.Top,Items[Index]);
end;