I try to paint a hightline text using backgroundcolor in all sepecial level of VirtualStringTree. It look like a selected nodes for all same level. The code below doesn't work. Please someone give a direction.
procedure TMainForm.Tree1PaintText(Sender: TBaseVirtualTree; const TargetCanvas: TCanvas; Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType);
var Data: PNodeData;LEVEL:INTEGER; tree1node,tree4Node: PVirtualNode;
begin
Data := Tree1.GetNodeData(Node);
Level := tree1.GetNodeLevel(node);
case column of
0:begin
if Level = 0 then BEGIN
TargetCanvas.Font.Style := TargetCanvas.Font.Style + [fsBold];
TargetCanvas.Font.Color :=CLyellow;
targetcanvas.Brush.Color :=clgreen;//don't work
targetcanvas.Brush.Style :=bssolid;
END;
if Level = 1 then BEGIN
TargetCanvas.Font.Color :=CLaqua;
targetcanvas.Brush.Color :=clgreen;
end;
end;