
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi there,
I'm have made a ribbon panel with buttons and a comboxbox in inventor 2016 using C#.
With the code below I'm adding OnSelect handles to the com bobox.
private static void CreateComboBoxLinks(IEnumerable<ComboBoxDefinition> thecomboboxes)
{
foreach (ComboBoxDefinition thecombobox in thecomboboxes)
{
switch (thecombobox.InternalName)
{
case "Commando12":
thecombobox.OnSelect += Command12; //
break;
}
}
}
public static void Command12(NameValueMap context)
{
So here I want to determ which item is clikced in the combo box.
How can I cast context to a combobox ??
Or does anyone have the code to use the items in a combobox.
MessageBox.Show(context.Item[0].ToString());
MessageBox.Show(context.Value["Item1"].ToString());
MessageBox.Show(context.Name[0].ToString());
}
Solved! Go to Solution.