views:

104

answers:

1

Hey guys. I have a problem with StandardColorMap and MainMenu. I need to create ColorMap in one submenu. How to do it?

P.S. I am programming with delphi 2007

A: 

first create the menuitems. then you have to use the canvas given by the OnDrawItem event of the menuItems (here'is a good explanation and use case).
one idea is to store the TColor value as integer in the Tag property. Then when OnClick is triggered, the color selected is the one in the Tag of the Sender, which is a TMenuItem.

loursonwinny