A TListView is connected with a style. This style contains a TColorObject named background. If you set the TColorObject.Color (red) in the styledesigner the Treeview will show this Color. If the Color is set programmatically in the ApplyStyleLookup Event of TListView the background Color remains on the Color (red) set in the style!!!!
procedure TTest.TreeViewlistApplyStyleLookup(Sender: TObject);
var
co: TColorObject;
begin
co := nil;
if Sender is TListView then co := TListView(Sender).FindStyleResource('background') as TColorObject;
if co <> nil then co.Color := TAlphaColors.Black;
//co is not nil
//TColorObject background is found and black is set, but it remains on red
end;
You can put TListView inside on TRectangle, and set Transparent property of listview in True.