views:

49

answers:

0

Hi there!

I'm using a ToolTipto display some additional info on my form components, and I'm handling the display by myself. That is I have a function that does :

Public Sub ShowTip(ByVal sender As Control)
    Dim Pair As String() = sender.Tag.ToString.Split(New Char() {";"c}, 2)

    If Pair.GetLength(0) = 1 Then
        MyToolTip.ToolTipTitle = ""
        MyToolTip.Show(Pair(0), sender, New Drawing.Point(0, sender.Height + Offset))
    ElseIf Pair.GetLength(0) > 1 Then
        MyToolTip.ToolTipTitle = Pair(0)
        MyToolTip.Show(Pair(1), sender, New Drawing.Point(0, sender.Height + Offset))
    End If
End Sub

Yet it seems to me that something dishy is going on. Sometimes, with this very code, when I have no title set, I get a tooltip with an empty space where the title should have been, while in other cases the neither the title nor the icon are shown.

I can't figure out how to force it to not display any title space or icon when tooltiptitle is set to ""...

Any ideas?