I have a combo box (winform). This combo box has some elements (e.g. 1,2,3,4).
Now, when I change the selection inside this combo, I want to know the old index and the new index .
How to get it?
Possible approaches that I want to AVOID .
Add an enter event , cache the current index, and then when changing the index of the selection, get a new index.
Using the selected text property / selected item received by the event sender.
What I ideally want:
In the case of getting the arguments, I want something like:
e.OldIndex; e.newIndex;
At the moment, the event arguments received in the SelectionIndex Change event are completely useless.
I do not want to use more than one event.
If C # doesn't offer this, can I pass in my event, which passes the old index and the new index as event arguments?
source
share