Ver Mensaje Individual
  #11  
Antiguo 10-09-2006
Avatar de seoane
[seoane] seoane is offline
Miembro Premium
 
Registrado: feb 2004
Ubicación: A Coruña, España
Posts: 3.717
Reputación: 24
seoane Va por buen camino
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]);
    // Esto al final
    if odFocused in State then
      Canvas.DrawFocusRect(Rect);
  end;
Responder Con Cita