Ver Mensaje Individual
  #8  
Antiguo 10-11-2020
Avatar de Angel.Matilla
Angel.Matilla Angel.Matilla is offline
Miembro
 
Registrado: ene 2007
Posts: 1.350
Reputación: 19
Angel.Matilla Va por buen camino
Llevo desde ayer dándole vueltas y lo más que he conseguido ha sido esto:

con este código:
Código:
void __fastcall TfDatos::DesglosesBeforeItemPaint(TBaseVirtualTree *Sender,
      TCanvas *TargetCanvas, PVirtualNode Node, TRect &ItemRect,
      bool &CustomDraw)
{
     vsRect = ItemRect;     
}
//---------------------------------------------------------------------------

void __fastcall TfDatos::DesglosesPaintText(TBaseVirtualTree *Sender, const TCanvas *TargetCanvas, PVirtualNode Node, TColumnIndex Column, TVSTTextType TextType)
{
     TargetCanvas->Font->Color  = clBlack;
     TargetCanvas->Font->Style  = ((PTreeDesglose)Sender->GetNodeData(Node))->Concepto.Pos("TOTAL") != 0 ? TFontStyles() << fsBold : TFontStyles() >> fsBold;
     TargetCanvas->Brush->Color = ((PTreeDatos)Sender->GetNodeData(Node))->Concepto.Pos("TOTAL") != 0 ? clYellow : clWhite;
     TargetCanvas->FillRect(vsRect);
}
//---------------------------------------------------------------------------
Evidentemente vsRec está definida a nivel de todo el formulario con TRect vsREct. Está claro que tiene que poderse pero no encuentro la forma. Seguiremos probando
Responder Con Cita