Ver Mensaje Individual
  #5  
Antiguo 26-06-2008
Avatar de escafandra
[escafandra] escafandra is offline
Miembro Premium
 
Registrado: nov 2007
Posts: 2.197
Reputación: 20
escafandra Tiene un aura espectacularescafandra Tiene un aura espectacular
Cita:
Empezado por Ziara Ver Mensaje
Código:
void __fastcall TForm1::ListViewCustomDrawItem(TCustomListView *Sender,
      TListItem *Item, TCustomDrawState State, bool &DefaultDraw)
{
 Sender->Canvas->Font->Color = clRed;

 if (snf2->Proto() == "TCP")
 {
  Sender->Canvas->Font->Color = clGreen;
 }
  if (snf2->Proto() == "UDP")
 {
  Sender->Canvas->Font->Color = clBlue;
 }
 if (snf2->Proto() == "ARP")
 {
  Sender->Canvas->Font->Color = clPurple;
 }
}
Prueba a añadir en tu código DefaultDraw = false;
Código:
void __fastcall TForm1::ListViewCustomDrawItem(TCustomListView *Sender,
      TListItem *Item, TCustomDrawState State, bool &DefaultDraw)
{
 Sender->Canvas->Font->Color = clRed;

 if (snf2->Proto() == "TCP")
 {
  Sender->Canvas->Font->Color = clGreen;
 }
  if (snf2->Proto() == "UDP")
 {
  Sender->Canvas->Font->Color = clBlue;
 }
 if (snf2->Proto() == "ARP")
 {
  Sender->Canvas->Font->Color = clPurple;
 }
 DefaultDraw = false;
}
Saludos.
Responder Con Cita