I have a ListView control in Details view as that (the view that shows the list as a grid)
mListView.View = View.Details;
mListView.mLVSelectedObject.ShowItemToolTips = true;
ListViewItem listViewItem = mListView.Items.Add(lValue.Name);
listViewItem.ToolTipText = "AAAAAAAAAAAAAAAAA";
The issue is that the tooltip only shows up when the cursors is over the first listview's column but not for the rest o them. I want to know if there's anyway to make it appear "easly" ?
After some research. I've solved the issue this way, but I'm still wondering if there is another way to do that avoiding EventHandlers;
ToolTip mTooltip;
Point mLastPos = new Point(-1, -1);
private void listview_MouseMove(object sender, MouseEventArgs e)
{
ListViewHitTestInfo info = mLV.HitTest(e.X, e.Y);
if (mTooltip == null)
mTooltip = new ToolTip();
if (mLastPos != e.Location)
{
if (info.Item != null && info.SubItem != null)
{
mTooltip.ToolTipTitle = info.Item.Text;
mTooltip.Show(info.SubItem.Text, info.Item.ListView, e.X, e.Y, 20000);
}
else
{
mTooltip.SetToolTip(mLV, string.Empty);
}
}
mLastPos = e.Location;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With