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