我有listview
对象,其中有几列。其中一列不适合所有文本信息,并且文本已被剪切。我需要实现这样的事情:当用户将鼠标光标移动到该列的单元格时,会显示所有文本。有可能这样做吗?我现在有:
protected ListViewItem GetItem(ListView listView, Point mousePosition)
{
Point localPoint = listView.PointToClient(mousePosition);
return listView.GetItemAt(localPoint.X, localPoint.Y);
}
private void myListView_MouseMove(object sender, MouseEventArgs e)
{
ListViewItem item = GetItem(myListView, Cursor.Position);
// or should I use e.Location instead of Cursor.Position?
item.ToolTipText = "my info"//Now I need to show "my info" on the cell
//that user move cursor on
}