VB.NET combobox SelectIndexChanged Event get before and after index

W

wallermj

I want to be able to compare the old combobox index to the newly
selected combobox index in the SelectIndexChanged event. How can I do
that? I know I could store the last selected value for the combobox
myself and compare that to the new index in the SelectIndexChanged
event, but doesn't VB.Net store this value somewhere so I don't have to?
 
M

Michel van den Berg

Dear wallermj,

Nope, not that I am aware of. What you could do is inherit the combobox,
override the OnSelectedIndexChanged and set your custom made
OldSelectedIndex (or create your own event which includes the old index
value).

Michel van den Berg
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top