I am emulating (to the degree possible) a TPopup Menu so it can float and users can drag it around.
To do this, it’s on its own form, and uses TPanels acting as if they are clickable TMenuItems.
I’m using TPanels so I can change their color.
To get the colors right, how can I determine at runtime (in Delphi 2010) the current theme’s colors for TMenuItem.Color and TMenuItem.Font.Color (assuming such properties existed).
TIA
Edit
I could use clBtnFace for the background, and clWindowText for the text color. But, I need to know the the theme colors for when the mouse is over a menu selection.
I believe the popupmenu uses the colour in the
clMenuconstant. If you need the colour as an rgb value, useColorToRgb(clMenu)to translate it. There’s clMenuBar, clMenuText and clMenuHighlight constants too.