TPopupActionBar Does Not Have ColorMap Property?

Ok, so I almost have a user-friendly interface, using TActionManager, TActionMainMenuBars and TToolBar with DrawingStyle as a gradient to create an OfficeXP style interface.

I also use several TPopupActionBar popup menus, but I don't see the ColorMap property. I use the ColorMap property to change the default XP style color color, as well as change the hot TToolBar color according to the menu.

Now I need the TPopupActionBar popup menu to match the menu and toolbar, but how can I do this when I see no way to assign it a ColorMap?

Sorry, if this is not trivial, I looked and can not see. I also tried to assign a ColorMap at runtime, but it doesn't seem to be a property? I can change the style of TPopupActionBar, but I cannot assign a ColorMap.

+5
source share
1 answer

To assign a ColorMap, you can use an OnGetControlClassevent TPopupActionBar, then check to see if there is one PopupMenu, and finally assign a nested property to ColorMapthis property.

check this sample.

procedure TFormMain.PopupActionBar1GetControlClass(Sender: TCustomActionBar;
  AnItem: TActionClient; var ControlClass: TCustomActionControlClass);
begin
  if Assigned(PopupActionBar1.PopupMenu) then
    PopupActionBar1.PopupMenu.ColorMap:= TwilightColorMap1;
end;

check this image which contains TPopupActionBar with TwilightColorMap applied

enter image description here

+3
source

All Articles