ListBox when I select a value from list: why half time that's select 1st
value as well with 2nd event?
As it says in tilte:
there is a ListBox
when I select a value in
1st SelectedValueChanged event contains value I clicked on
and time to time there is 2nd SelectedValueChanged event contains 1st
value from the list
I catched it adding those piece of code:
This is what my designer contains:
this.listBox1.SelectedValueChanged +=
new System.EventHandler(this.listBox1_SelectedValueChanged);
This is what my class contains :
public class myControl : UserControl
{
private void tokenListBox_SelectedValueChanged(object sender, EventArgs e)
{
StackTrace st = new StackTrace(true);
} /// I put a break point that line
to look at st
}
I cannot see where 2nd event is fired. In the stack there is plenty of
system code and nothing very revelant from my own code. But I can past it
here on demand.
The only think I not really mastering is the UserControl context. Maybe
something to do around that.
With that, do you have an idea about why I got twice call when I click once ?
No comments:
Post a Comment