Cita:
Empezado por Kimero
Sigo encontrando delirios, el simple hecho de cambiar la fuente a otro color q no sea black hace q se anule 'la inversión'
|
La instrucción DrawFocusRect debe ser la ultima:
Código Delphi
[-]
with Control as TListBox do
begin
Canvas.Brush.Style := bsSolid;
Canvas.Brush.Color:= clGray;
Canvas.Pen.Style := psSolid;
Canvas.Pen.Color := clRed;
Canvas.Pen.Width := 1;
if odSelected in State then
Canvas.Rectangle(Rect)
else
Canvas.FillRect(Rect);
Canvas.Font.Color := clRed;
Canvas.TextOut(Rect.Left + 1, Rect.Top + 1, Items[Index]);
if odFocused in State then
Canvas.DrawFocusRect(Rect);
end;