How do I 'blank out' the text of a tooltip?
Posted on 2006-05-25
I use the following sub to display a tooltip. It displays fine. But if I later change the values in my array to 0, the original tooltip text displays. I never get it to not display. So if arrKToolTip(2) = 182 is the first value, my tooltip displays 182 as it should. But later, I reset arrKToolTip(2) to arrKToolTip(2) = 0. The tooltip still displays 182. Apparently, tooltip text lingers in VB.Net and must be eliminated somehow. I tried tooltip1.RemoveAll() but that did nothing either.
My goal is to have the tooltip no longer show up if I clear the contents of the textbox when no longer needed for display. What am I missing? Thank you in advance for your assistance.
Private Sub txtKZone3_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtKZone3.MouseHover
Dim tooltip1 As New ToolTip
Dim strToolTip As String
strToolTip = arrKToolTip(2).ToString
If arrKToolTip(2) = 0 Then
strToolTip = ""