multiline ToolTipText solution????????
object.ToolTipText= "First line" & vbNewLine & "Next line"
Does not work!
object.ToolTipText= "First line" & vbCRLf & "Next line"
Doesn't!
Help!!!!!!
Printable View
multiline ToolTipText solution????????
object.ToolTipText= "First line" & vbNewLine & "Next line"
Does not work!
object.ToolTipText= "First line" & vbCRLf & "Next line"
Doesn't!
Help!!!!!!
I'm sorry, but the built in ToolTipText window can't have multiple lines. You have to exchange it to an other control.
There are a lot of bubble controls out there that can be used as tooltips.
'the ultimate walk around, if you don't tell, no one
will know it isn't a multiline tooltip.
Code:'create multil line tag tips...same use as tool tips except
'that with tool tips you are restricted to one line..
'with tag tips you get multiline
'remember to set the height and width of your
'label to fit your message
'
'this example uses a command button (command1) & a label (label1)
'
'on mouse over the command button the tool tag is displayed
'
Private Sub Form_Load()
Label1.BackStyle = 0 'or 1 and set the backcolor to tooltip color
Label1.Visible = False
End Sub
Private Sub Command1_MouseMove(Button As Integer, _
Shift As Integer, X As Single, Y As Single)
Dim msg$
msg$ = "Tag tips for the beginner." & vbCrLf
msg$ = msg$ & "Multil Line Tag Tips Made Easy" & vbCrLf
msg$ = msg$ & "Think of the possibilities!"
Command1.Tag = msg$
Label1.Caption = Command1.Tag
Label1.Top = Command1.Top + Command1.Height
Label1.Left = Command1.Left + Command1.Width / 2
Label1.Visible = True
End Sub
Private Sub Label1_MouseMove(Button As Integer, _
Shift As Integer, X As Single, Y As Single)
Label1.Visible = False
End Sub
Private Sub Form_MouseMove(Button As Integer, _
Shift As Integer, X As Single, Y As Single)
Label1.Visible = False
End Sub
x
The problem with HeSaidJoe's code is that a label can't be on top of the ZOrder.
Put an other command button just under Command1 and you can't see the label.
solution:
Just add the mousemove events to anything around the given area you are using.