Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

enter image description here

like image 549
Salvador Avatar asked Apr 15 '12 20:04

Salvador


1 Answers

Replace the TPopupmenu for a TPopupActionBar or use a interposer class to cast the TPopupMenu to TPopupActionBar.

 TPopupMenu=class(Vcl.ActnPopup.TPopupActionBar);

Also you can read this Adding VCL Styles support to a TPopupMenu in 2 lines of code

enter image description here

like image 167
RRUZ Avatar answered Sep 21 '22 15:09

RRUZ