Get colors of skinned menu

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #70458
    Support
    Keymaster

      Hi
      Menu may have gradient or filled by texture, which color should be returned for background?
      You can try to use this code:
      uses sVCLUtils;

      Color := acColorToRGB(clMenu);
      Color := acColorToRGB(clMenuText);
      
      // Active item color
      Color := sSkinManager1.CommonSkinData.gd[sSkinManager1.SkinCommonInfo.Sections[ssMenuItem].Props[1].Color;
      
      // Active item text color
      Color := sSkinManager1.CommonSkinData.gd[sSkinManager1.SkinCommonInfo.Sections[ssMenuItem].Props[1].FontColor.Color;
      

      Color of disabled item is calculated (it’s semitransparent)

      • This reply was modified 4 years, 4 months ago by Support.
    Viewing 1 post (of 1 total)
    • You must be logged in to reply to this topic.