Buttons

kjellsor

Newcomer
Joined
Nov 22, 2004
Messages
11
Hi im working on a tooltip function for my program.

This is what i got.

Private Sub Button2_Click_1....
ToolTip1.SetToolTip(Button1, "text")

My question is: How do i turn OFF tooltip by clicking on the same "help" button.
 
One solution to toggle the ToolTip would be to:

Dim tipText as string = ToolTip1.GetToolTip(Button1)

If tipText.Length = 0 Then
' The ToolTip text is not set, add text
ToolTip1.SetToolTip(Button1, desiredText)
Else
' The ToolTip text is set, remove it
ToolTip1.SetToolTip(Button1, "")
End If
 
Back
Top