Thanks very much for the quick reply. In fact I have encountered a couple of problems.
I am planning to have a splitButton containing a button and a dynamic menu. But when I was trying to include the dynamic menu as part of the splitButton I get errors saying that just a menu can be part of a splitBottom. Is this the case? So now I have created a splitButton with a menu which contains a dynamic menu as following:
<splitButton id='SplitButtonCheckBoxRefresh' size='large' >
<button id='ButtonCheckBoxRefresh' label='Refresh Using Check Boxes' image='Load' onAction='RunTagMacro' tag='RefreshAll' />
<menu id='MenuCheckBoxRefresh' label='Menu' >
<dynamicMenu id="DynamicCheckBoxRefresh" label="Select Curves"
getContent="OnGetContent_CheckBox"
invalidateContentOnDrop="true"
/>
</menu>
</splitButton>
with the c# code as:
public string OnGetContent_CheckBox(IRibbonControl control)
{
var context = AddIn.Bootstrapper.Container.Resolve<ExcelContext>();
var curvesByKey = context.CurvesByKey;
foreach (var item in curvesByKey)
{
stCheckBox += "<checkBox id='curve" + Guid.NewGuid().ToString() + "\' label= '" + item.Value.CurveName + "'/>";
}
stCheckBox += "</menu>";
return stCheckBox;
}
Now two question please?
1) Can dynamic menu be directly part of splitButton?
2) More important question: The Check boxes i get in my ribbon look and behave like buttons and not check boxes. I can not tick and select multiple choices and operate an action on them?
Many thanks.