嗨,我想在标准命令栏(如发送和接收按钮)上为我的 CommandBarPopup 按钮添加图像图标。
弹出窗口正在工作,我有带有图标的按钮,但我需要弹出窗口中的顶部图标(在小下拉图标旁边)
创建弹窗的代码:
moznosti = (Office.CommandBarPopup)standardToolbar.Controls.Add(
Office.MsoControlType.msoControlPopup,
System.Reflection.Missing.Value,
System.Reflection.Missing.Value,
System.Reflection.Missing.Value,
true);
// 向弹出窗口添加按钮是可以的:
nastaveni = (Office.CommandBarButton)moznosti.Controls.Add(1,missing, missing, missing, true);
nastaveni.Caption = "Na&stavení...";
global.SetImage(nastaveni, Properties.Resources.settings);
nastaveni.Style = Office.MsoButtonStyle.msoButtonIconAndCaption;
nastaveni.Click += new Office._CommandBarButtonEvents_ClickEventHandler(ButtonSettingsClick);
... ETC...
但我需要这样的东西:
moznosti.Picture = ...
但没有 Picture 变量(如在 CommandBarButton 对象中)