sathish ranga

sathish ranga

  • NA
  • 4
  • 15.5k

Listview Mouse hover item

Oct 22 2012 1:56 AM
I have One listview and Four Textboxes
When i mouse hover listview Items i want to displays those subitems in Textboxes
I tried this but didn't get the solution.............



private void lvThumbnail_MouseHover(object sender, EventArgs e)
   
{
       
try
       
{
           
if (lvThumbnail.SelectedItems.Count > 0)
           
{
                txtCity
.Text = lvThumbnail.SelectedItems[0].SubItems[1].Text;
                txtCurrency
.Text = lvThumbnail.SelectedItems[0].SubItems[2].Text;
                txtPopulation
.Text = lvThumbnail.SelectedItems[0].SubItems[3].Text;
                txtLanguage
.Text = lvThumbnail.SelectedItems[0].SubItems[4].Text;
                lvThumbnail
.Refresh();
           
}
           
}

       
catch (Exception ex)
       
{
           
MessageBox.Show(ex.Message);
       
}
   
}

Answers (1)