Remove ToolTip from a special control
-
hi, how can i remove a tooltip from a control? my problem is i have a textchanged event, that should set a tooltip to an picture box by:
toolTip.SetToolTip(targetControl, caption);
--> the tooltip change with the content in the textbox, so when i execute again the SetToolTip function a new tooltip will be created, but the old one is already existing. thats why i am looking for a function to remove the old tooltip... -
hi, how can i remove a tooltip from a control? my problem is i have a textchanged event, that should set a tooltip to an picture box by:
toolTip.SetToolTip(targetControl, caption);
--> the tooltip change with the content in the textbox, so when i execute again the SetToolTip function a new tooltip will be created, but the old one is already existing. thats why i am looking for a function to remove the old tooltip...Hi, normally, this should work:
private void textBox1_TextChanged(object sender, EventArgs e) { toolTip1.SetToolTip(pictureBox1, textBox1.Text); //toolTip1.RemoveAll(); }
I created a picturebox named 'pictureBox1' and placed the above code within the text-change eventhandler of my textbox 'textBox1'. Anytime I changed the text the tooltip will be updated. There are no multiple tooltips on the picturebox. Maybe try the method RemoveAll() of toolTip1. Regards Erik -
Hi, normally, this should work:
private void textBox1_TextChanged(object sender, EventArgs e) { toolTip1.SetToolTip(pictureBox1, textBox1.Text); //toolTip1.RemoveAll(); }
I created a picturebox named 'pictureBox1' and placed the above code within the text-change eventhandler of my textbox 'textBox1'. Anytime I changed the text the tooltip will be updated. There are no multiple tooltips on the picturebox. Maybe try the method RemoveAll() of toolTip1. Regards ErikSet the "AutoPopDelay" property of ToolTip. Regards, Bhupi Bhai.
-
hi, how can i remove a tooltip from a control? my problem is i have a textchanged event, that should set a tooltip to an picture box by:
toolTip.SetToolTip(targetControl, caption);
--> the tooltip change with the content in the textbox, so when i execute again the SetToolTip function a new tooltip will be created, but the old one is already existing. thats why i am looking for a function to remove the old tooltip... -
Hi, normally, this should work:
private void textBox1_TextChanged(object sender, EventArgs e) { toolTip1.SetToolTip(pictureBox1, textBox1.Text); //toolTip1.RemoveAll(); }
I created a picturebox named 'pictureBox1' and placed the above code within the text-change eventhandler of my textbox 'textBox1'. Anytime I changed the text the tooltip will be updated. There are no multiple tooltips on the picturebox. Maybe try the method RemoveAll() of toolTip1. Regards Erik -
hi, how can i remove a tooltip from a control? my problem is i have a textchanged event, that should set a tooltip to an picture box by:
toolTip.SetToolTip(targetControl, caption);
--> the tooltip change with the content in the textbox, so when i execute again the SetToolTip function a new tooltip will be created, but the old one is already existing. thats why i am looking for a function to remove the old tooltip... -
hi, how can i remove a tooltip from a control? my problem is i have a textchanged event, that should set a tooltip to an picture box by:
toolTip.SetToolTip(targetControl, caption);
--> the tooltip change with the content in the textbox, so when i execute again the SetToolTip function a new tooltip will be created, but the old one is already existing. thats why i am looking for a function to remove the old tooltip...This explains quite well that if you perform toolTip.SetToolTip(targetControl, caption); and the control already has a caption, then this will be overwrote. It will not just add a new one. http://msdn.microsoft.com/en-us/library/system.windows.forms.tooltip.settooltip.aspx[^]