list view question: GetItemAt method doesn't work

  • Thread starter Thread starter Linda Chen
  • Start date Start date
L

Linda Chen

I try to use GetItemAt method inside my mouse_down event,
but it always return null value to me. Here is my sample
code:

private void listFileHistory_MouseDown(object sender,
MouseEventArgs e)
{

System.Windows.Forms.ListViewItem item =
this.listFileHistory.GetItemAt(e.X, e.Y);
}

Any idea?

Thanks

Linda Chen
 
That code works fine for me.
Are you sure you're clicking on the item?
Does the item become selected afterwards?

/claes
 
Back
Top