You know, of course, that underneath the .NET ListView class is a Windows listview control. This listview control uses a Windows tooltip control to show the truncated strings.
You can get hold of this underlying tooltip control through the LVM_GETTOOLTIPS message.
[DllImport("user32.dll", CharSet = CharSet.Auto)]
public static extern IntPtr SendMessage(IntPtr hWnd, int msg,
int wParam, int lParam);
public IntPtr GetTooltipControl(ListView lv) {
const int LVM_GETTOOLTIPS = 0x1000 + 78;
return SendMessage(lv.handle, LVM_GETTOOLTIPS, 0, 0);
}
Once you have the handle to the tooltip control, you can send messages to it.
public void SetTooltipDelay(ListView lv, int showTime) {
const int TTM_SETDELAYTIME = 0x400 + 3;
const int TTDT_AUTOPOP = 2;
IntPtr tooltip = this.GetTooltipControl(lv);
if (tooltip != IntPtr.Zero) {
SendMessage(tooltip, TTM_SETDELAYTIME, TTDT_AUTOPOP, showTime);
}
}
showTime is the number of milliseconds you want the control to stay visible.