Ver Mensaje Individual
  #2  
Antiguo 30-05-2007
Avatar de cHackAll
[cHackAll] cHackAll is offline
Baneado?
 
Registrado: oct 2006
Posts: 2.159
Reputación: 20
cHackAll Va por buen camino
Cool Solucion


A la propiedad de tu ListBox llamada "Style" definela como lbOwnerDrawFixed en tiempo de diseño, en el Evento OnDrawItem copia el siguiente código:

Código Delphi [-]
procedure TForm1.ListBox1DrawItem(Control: TWinControl; Index: Integer; Rect: TRect; State: TOwnerDrawState);
begin
 with ListBox1.Canvas do
  begin
   if odSelected in State then
    Brush.Color := clRed
   else
    Brush.Color := clWhite;
   FillRect(Rect);
   TextOut(Rect.Left + 4, Rect.Top + 1, ListBox1.Items[Index]);
  end;
end;

Suerte!
Responder Con Cita