I had to customize the tpopup menu, recently for my needs, so thought I would share.It has gradient fill for background, scales item bitmaps, and imagelist to fit, will cache bitmaps of disabled item and cache them as it grayscales them.
You can make an item a heading by preceding the caption with <head>
its simple to use, I think so anyhow.
Add the unit to your uses clause.uses ......, custommenuhandler;
Define the popupmenu as you wish, then before you call it for first time the items need hooking in, so then call, you only do this once.CustomMenuHandlers.SetupPopUpMenuEvents(PopupMenu1,True);
Then in the popupmenu on popupevent, add this is to allow customized settings for tpopup you have defined.CustomMenuHandlers.SetDisplayValues(clNone,clNone,'Gill Sans MT',18,1.0,clWhite,clNone,[],[fsBold],[fsItalic]);
CustomMenuHandlers.SetDefaultGradientValues;
Thats it, it should work, all the colors for gradient, fonts, are customizeable.
I've only tested on win32 widget so be interesting to see how it works on others.
Hope you enjoy
Changing one line toCustomMenuHandlers.SetDisplayValues(RGBToColor(128,32,64),RGBToColor(64,4,8),'Comic Sans MS',18,1.8,clLime,clYellow,[],[fsBold],[fsItalic]);
Produces something totally different.