CheckedListBox的MouseMove事件

//鼠标移动至患者姓名,显示信息提示框。
private void checkedListBox_Patients_MouseMove(object sender, MouseEventArgs e)
{
int itemIndex = checkedListBox_Patients.IndexFromPoint(new Point(e.X, e.Y));

        if (itemIndex >= 0)
        {
            CheckedListBoxItem item = checkedListBox_Patients.Items[itemIndex] as CheckedListBoxItem;
            if (checkedListBox_Patients.Items[itemIndex] != null)
            {
                label_DoctorOrNurse.Text = item.NameAndUniqueName;
            }
        }
    }

你可能感兴趣的:(CheckedListBox的MouseMove事件)