开发者

StandardColorMap in MainMenu

开发者 https://www.devze.com 2022-12-26 02:50 出处:网络
Hey guys. I have a problem with StandardColorMap and MainMenu. I need to create ColorMap in one submenu. How to do it?

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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消