dz3164244

A Possible Bug of Arcmap Add-In Combobox

Discussion created by dz3164244 on Dec 22, 2013
Latest reply on Dec 23, 2013 by dz3164244
Hello, I am using C# to develop an Arcmap addin. I wonder whether there is a bug at the function ComboBox.GetItem().

I tried to run the following code when the combobox was initialized: (an item is already added)
MessageBox.Show(this.GetItem(0).Caption)

but it failed to popup a messagebox. So I used this.items(0).Caption instead and it worked.

So I guess there is difference between ComboBox.GetItem(index) and ComboBox.items[index]. Or there may be a bug.

btw, is there a way that the add-in can get access to events of controls at ArcMap? For example, directly response to the layer addition or deletion.

Outcomes