
10.07.2014, 15:22
|
 |
LMD-DML
|
|
Регистрация: 12.07.2009
Адрес: Богородское
Сообщения: 3,025
Версия Delphi: D7E
Репутация: 1834
|
|
Код:
With (Control as TListBox) do begin
if odSelected in State then
//if Index mod 2 = 0 then
begin
DrawFocusRect((Control as TListBox).Canvas.Handle, Rect);
canvas.Pen.Width:=3;
canvas.Pen.Color:=clblue;
canvas.Brush.Color:=clred
// end else
// begin
// DrawFocusRect((Control as TListBox).Canvas.Handle, Rect);
// canvas.Pen.Width:=3;
// canvas.Pen.Color:=clblue;
// canvas.Brush.Color:=clyellow;
end
else begin
canvas.Pen.Width:=0;
canvas.Pen.Color:=color;
canvas.Brush.Color:=color;
end;
canvas.FillRect(rect);
DrawText(Canvas.Handle, PChar(Items[Index]), Length(Items[Index]), Rect,
Control.DrawTextBiDiModeFlags(DT_SINGLELINE or DT_VCENTER or DT_NOPREFIX));
end;
|