我尝试将列表添加到“功能区”组合框中,但操作失败。没有工具,没有例外。
下面是我的代码
List<CompanyName> companyNames = new OptTK().ReturnCompany();
RibbonComboBox cbx = Globals.Ribbons.RMST_Ribbon.CboxBom;
cbx.Items.Clear();
for (int i = 0; i < companyNames.Count; i++)
{
RibbonDropDownItem dropDownItem = Globals.Factory.GetRibbonFactory().CreateRibbonDropDownItem();
dropDownItem.Label = companyNames[i].name;
cbx.Items.Add(dropDownItem);
}