Infotip


#1

Hello everybody,
On a Winform form, I have got a ListBox.
One item in it has a text that is a little longer than the others, so a few characters do not appear.
I use an infotip to let it appear, this is in listBox1_SelectedIndexChanged :


		ToolTip toolTip1 = new ToolTip
		{
		    OwnerDraw = false,
			// Set up the delays for the ToolTip.
			AutoPopDelay = 5000,
			InitialDelay = 1000,
			ReshowDelay = 500,
			// Force the ToolTip text to be displayed whether or not the form is active.
			ShowAlways = true
		};

		if (listBox1.SelectedItem == null) return;
		// Set up the ToolTip text for the Button and Checkbox.
		toolTip1.SetToolTip(listBox1, "".PadLeft(200, '*'));
		toolTip1.SetToolTip(listBox1, listBox1.SelectedItem.ToString());

So long the mouse cursor is on the ListBox, this works fine.
But if the cursor goes out of the ListBox and back again, all the history of the tooltip appears on the screen.
In fact, if the longest item is selected, there is no problem. But, if it is a shorter one, its label appears with infotip, above the longest that appears behind. The beginning of the longest is hidden by the text of the active item. So the info is available, but that can be confusing.
Well, is there any way to clear the infotip ?

PadLeft(200, ‘*’) is an attempt I made, but this changes nothing.
tooltip1.RemoveAll() does not do it (I do not know what it does).