G
Guest
I was wondering how the default value of an item in a combBox is set in the
RibbonX world. This used to be ListIndex in the older CommandBar model and I
used to set it to 1 (for example) after doing AddItems.
I used OutlookRibbonXVB_VSTO as a starting point and have the following XML
for the ribbon:
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui"
onLoad="Ribbon_OnLoad">
<ribbon>
<tabs>
<tab idMso="TabNewMailMessage">
<group id="MyWidgetsGroup"
getVisible="MyWidgetsGroup_GetVisible"
getLabel="MyWidgetsGroup_GetLabel"
insertBeforeMso="GroupClipboard" >
<comboBox
id="MyCombo"
label="My Combo"
onChange ="MyCombo_OnChange"
getItemCount ="MyCombo_GetItemCount"
getItemLabel ="MyCombo_GetItemLabel"
/>
{etc. for brevity}
The MyCombo_GetItemCount returns 4 and MyCombo_GetItemLabel returns the
strings
"A", "B", "C", and "D" for index values of 0, 1, 2,and 3 respectively.
When I display the new inspector, all the items are there when I pull down
the comboBox but the initial value is blank.
I am missing some connection somewhere between the object model and the XML
and can't seem to figure out the connection. Or there is a simple callback
somewhere I am missing.
Hope someone can help.
RibbonX world. This used to be ListIndex in the older CommandBar model and I
used to set it to 1 (for example) after doing AddItems.
I used OutlookRibbonXVB_VSTO as a starting point and have the following XML
for the ribbon:
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui"
onLoad="Ribbon_OnLoad">
<ribbon>
<tabs>
<tab idMso="TabNewMailMessage">
<group id="MyWidgetsGroup"
getVisible="MyWidgetsGroup_GetVisible"
getLabel="MyWidgetsGroup_GetLabel"
insertBeforeMso="GroupClipboard" >
<comboBox
id="MyCombo"
label="My Combo"
onChange ="MyCombo_OnChange"
getItemCount ="MyCombo_GetItemCount"
getItemLabel ="MyCombo_GetItemLabel"
/>
{etc. for brevity}
The MyCombo_GetItemCount returns 4 and MyCombo_GetItemLabel returns the
strings
"A", "B", "C", and "D" for index values of 0, 1, 2,and 3 respectively.
When I display the new inspector, all the items are there when I pull down
the comboBox but the initial value is blank.
I am missing some connection somewhere between the object model and the XML
and can't seem to figure out the connection. Or there is a simple callback
somewhere I am missing.
Hope someone can help.