Get colors of skinned menu

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #70452
    alexanderk
    Participant

    Hi.
    Is there any method to get colors of menu background, font color for normal, selected & disabled items?

    #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 3 years ago by Support.
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.