【发布时间】:2011-01-05 16:52:42
【问题描述】:
您好,我想在标准命令栏(如发送和接收按钮)上为我的 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);
...等等...
但我需要这样的东西:
moznosti.Picture = ... 但没有 Picture 变量(如在 CommandBarButton 对象中)
【问题讨论】:
标签: c# outlook icons vsto commandbar