procedure TDUnitDialog.FailureListViewSelectItem(Sender: TObject; Item: TListItem; Selected: Boolean);
var
hlColor :TColor;
begin
if Selected then
begin
TestTree.Selected := TTreeNode(Item.data);
hlColor := clFAILURE;
if Item.ImageIndex >= 1 then
hlColor := clERROR;
with ErrorMessageRTF do
begin
Clear;
SelAttributes.Style := [fsBold];
SelText := Item.Caption + ': ';
SelAttributes.Color := hlColor;
SelAttributes.Style := [fsBold];
SelText := Item.SubItems[0];
SelAttributes.Color := clWindowText;
Lines.Add('');
SelAttributes.Style := [];
SelText := Item.SubItems[1];
end
end
End; |