Just trying to set manually a TButton with client styles turned off to match Tab settings. I just can't seem to get the fill color for ttTabItemNormal and ttTabItemHot, is this possible ?

Just trying to set manually a TButton with client styles turned off to match Tab settings. I just can't seem to get the fill color for ttTabItemNormal and ttTabItemHot, is this possible ?
e.g.
LDetails := StyleServices.GetElementDetails(ttTabItemNormal);
StyleServices.GetElementColor(LDetails, ecFillColor, .FNormalColor);
StyleServices.GetElementColor(LDetails, ecTextColor, FFontNormalColor);

Comments

  1. Just had a moment to step into the functions.

    Looks like Vcl.Styles function for GetElementColor() does nothing if you dont have ecTextColor set

    ReplyDelete
  2. Unfortunately you can't get the colors of the tabs used because these are drawn using the bitmap linked to the current element (ttTabItemSelected, ttTabItemHot, ttTabItemNormal), Only the text color of the tabs can be retrieved by using the GetElementColor function.

    ReplyDelete
  3. Rodrigo Ruz thanks, that explains what I was reading when stepping into the code

    ReplyDelete

Post a Comment