简体   繁体   English

我如何将vcl样式应用于TPopupmenu?

[英]How I can apply a vcl style to a TPopupmenu?

I'm using the vcl styles in a Delphi XE2 application, but when i popup a TPopupmenu this is show using the native windows look and feel, exist any way to apply the vcl style colors to the TPopUpMenu? 我在Delphi XE2应用程序中使用vcl样式,但是当我弹出TPopupmenu这是使用本机windows外观和感觉显示时,是否有任何方法将vcl样式颜色应用于TPopUpMenu?

在此输入图像描述

Replace the TPopupmenu for a TPopupActionBar or use a interposer class to cast the TPopupMenu to TPopupActionBar. 替换TPopupActionBar的TPopupmenu或使用内插器类将TPopupMenu强制转换为TPopupActionBar。

 TPopupMenu=class(Vcl.ActnPopup.TPopupActionBar);

Also you can read this Adding VCL Styles support to a TPopupMenu in 2 lines of code 您还可以Adding VCL Styles support to a TPopupMenu in 2 lines of code阅读此Adding VCL Styles support to a TPopupMenu in 2 lines of code

在此输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM