There are several themes with XE2 that can be used for your application. For instance. Carbon that changes the background color of a TListView to gray, among other things.
Is there any way to get this color?
TListView.Color returns white if the background is somehow gray.
I tried using StyleServices.GetElementDetails with the following snippet:
var lColor: TColor; lDetails: TThemedElementDetails; if StyleServices.Enabled then begin lDetails := StyleServices.GetElementDetails(tlListviewRoot); StyleServices.GetElementColor(lDetails, ecFillColor, lColor); end;
But GetElementColor fails and returns false. Am I using the wrong parameter? Or my approach is wrong.
Possible parameters can be found here:
TThemedListView
TElementColor
Thanks.
PS: I also read this post , but the answer has not helped me yet.
source share