M
mp
from msdn there are two events that are supposed to fire when an item is
checked
ItemCheck and ItemChecked
I don't see an explanation of the difference but i cant' get either one to
fire.
ah, now one is, don't know what i did to get it...but in general...how do i
get
all the various events on a control....double clicking the control in the
designer will
stub out one event...but what about the others?
example
if i double click in the listview lvCriteriaList, this code appears in the
codebehind.cs
private void lvCriteriaList_SelectedIndexChanged(object sender, EventArgs e)
{
}
and also this line appears in the designer.cs file
this.lvCriteriaList.SelectedIndexChanged += new
System.EventHandler(this.lvCriteriaList_SelectedIndexChanged);
I don't know how to get at other events
but i copied/pasted/modified an event from msdn for item check
private void lvCriteriaList_ItemCheck(object sender,
System.Windows.Forms.ItemCheckEventArgs e)
{
MessageBox.Show("item check");
}
but it wasn't firing because there was nothing for it in the designer.cs
file
---now there is...don't know how it got there...been trying few things to
try to get event to fire
somehow the ide finally wrote in the line
this.lvCriteriaList.ItemCheck += new
System.Windows.Forms.ItemCheckEventHandler(this.lvCriteriaList_ItemCheck);
how do you get all the available events
so when you write an event handler
the ide writes the "event subscription line"??(whatever the correct term is)
into the designer.cs
thanks
mark
checked
ItemCheck and ItemChecked
I don't see an explanation of the difference but i cant' get either one to
fire.
ah, now one is, don't know what i did to get it...but in general...how do i
get
all the various events on a control....double clicking the control in the
designer will
stub out one event...but what about the others?
example
if i double click in the listview lvCriteriaList, this code appears in the
codebehind.cs
private void lvCriteriaList_SelectedIndexChanged(object sender, EventArgs e)
{
}
and also this line appears in the designer.cs file
this.lvCriteriaList.SelectedIndexChanged += new
System.EventHandler(this.lvCriteriaList_SelectedIndexChanged);
I don't know how to get at other events
but i copied/pasted/modified an event from msdn for item check
private void lvCriteriaList_ItemCheck(object sender,
System.Windows.Forms.ItemCheckEventArgs e)
{
MessageBox.Show("item check");
}
but it wasn't firing because there was nothing for it in the designer.cs
file
---now there is...don't know how it got there...been trying few things to
try to get event to fire
somehow the ide finally wrote in the line
this.lvCriteriaList.ItemCheck += new
System.Windows.Forms.ItemCheckEventHandler(this.lvCriteriaList_ItemCheck);
how do you get all the available events
so when you write an event handler
the ide writes the "event subscription line"??(whatever the correct term is)
into the designer.cs
thanks
mark