mouse double click event problem

G

Gaz

Hi im trying to create a double click event on a list view and i have
it working perfectly ish, problem is the event will even fire if i
double click on the scroll bars any ideas on how i stop this from
happening?

Here is what i have already done..

Added this to the designer of the form:

this.uList.MouseDoubleClick += new
System.Windows.Forms.MouseEventHandler(this.uList_DoubleClick);


and then created this in my form:

private void uList_DoubleClick(object sender, System.EventArgs e)
{

string sKey =
Convert.ToString(uList.SelectedItems.First.Key);

MessageBox.Show(sKey);
}
 

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