ListView ToolTip on Items and SubItems

T

thomas

Hi all!

I have an Windows Form app with a ListView and a tooltip for each
ListViewItem and SubItem. MainItem and all the SubItems have different
tooltip text's.
With the .net framework version 1.1 i implemented it the following way.
Everything works perfect. But now i switched to .net framework 2.0 and
the tooltip
flickered (something like 5 Hz) when the mouse is over the
item/subitem.
I tried to use the new ListViewItem property 'ToolTipText' in
combination with the ListView
property 'ShowItemToolTip', but it works only for the item and not for
the subitem's.

Can anybody help, please?
Thanks, Thomas

....
ListView.MouseMove += new MouseEventHandler(this.ToolTip_MouseMove);
....
private void ToolTip_MouseMove(object sender,
System.Windows.Forms.MouseEventArgs e)
{
System.Windows.Forms.ListView lstView =
(System.Windows.Forms.ListView)sender;
ListViewItem lv = (ListViewItem)lstView.GetItemAt(5 ,e.Y);
// code to retrieve the tooltip text <strToolTip> left
......
m_toolTip1.SetToolTip(lstView, strToolTip);
.....
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top