开发者

TPopupActionBar has no ColorMap property?

Ok, so I almost have a good looking UI, using TActionManager, TActionMainMenuBars and TToolBar with DrawingStyle as gradient to create a OfficeXP style interface.

I am using a couple of TPopupActionBar popup menus too, but I dont see a ColorMap property. I am using a ColorMap property to change the color of the default XP style color, and also changing the Hot Color of the TToolBar to match the menu.

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

Excuse me if this is non trivial,开发者_如何转开发 I have looked and cannot see. I also tried at runtime to assign a ColorMap but there doesnt seem to be the property for it?? I can change the Style of the TPopupActionBar, but cannot assign a ColorMap.


To assign a ColorMap you can use the OnGetControlClass event of the TPopupActionBar component , then check if the PopupMenu is not nil and finally assign the nested property ColorMap of this 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 a TPopupActionBar with the TwilightColorMap applied

TPopupActionBar has no ColorMap property?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜