I am using a ListView
with a few fixed-size columns.
The text in the rows may be too large to fit in the column, so I would like to make it so that when the user hovers over the ListViewItem
, it shows a tooltip with more text.
I tried setting the ToolTipText
property of the ListViewItem
:
ListViewItem iListView = new ListViewItem("add"); iListView.ToolTipText = "Add Expanded"; myListView.Items.Add(iListView);
Unfortunately, it didn't seem to work. How can I get ListViewItems
to show ToolTips?
A tooltip control can be either active or inactive. When it is active, the tooltip text appears when the mouse pointer is on a tool. When it is inactive, the tooltip text does not appear, even if the pointer is on a tool. The TTM_ACTIVATE message activates and deactivates a tooltip control.
A tooltip is a small pop-up window that displays some information when you rollover on a control. In this article, I will discuss how to create and use a Tooltip control in a Windows Forms application using Visual Studio 2010.
Set the ListView's ShowItemToolTips
property to true.
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