Select to view content in your preferred language

ComboBox addin OnSelChange event

1574
2
10-29-2009 01:16 PM
PaulKroseman
Frequent Contributor
What action triggers the OnSelChange event?

The OnEditChange event triggers when I type in the combobox (for each letter typed) and whenever I select a different item from the list. I thought OnSelChange would trigger when a different item is selected.

I'm using VB.net
0 Kudos
2 Replies
RalfGottschalk
Esri Contributor
Hi Krosemanp,

I can understand why you are confused.  It seems like you have discovered a bug with VB.NET and the OnSelChange event.  It actually does not fire in VB.NET at all, but works in C#.  The NIM for that bug is NIM050513.
 
The other issue is that both the OnSelChange event and the OnEditChange event fire when you select different items.  This is different than the ComboBox in VBA, and I could see how you might have code for editing that you would not want to have fire when selecting.  I went ahead and logged another NIM for this issue.  NIM050516, asking that only the selection event fires when changing selections.
0 Kudos
PaulKroseman
Frequent Contributor
Thanks for that information. I have switched to C# to continue testing.

I have encountered another event with odd functionality. The OnEnter event does not fire when the drop-down list is visible. Only the OnFocus(False) event triggers when the enter key is used with the list visible. This occurs in both VB.NET and C#.

Is this intentional or another bug?
0 Kudos