I thought that by doing "Line 1" & Chr$(13) & "Line 2" etc, I might be able to generate multi-line tool tips, but it doesn't work.
Any idea how this is possible? I've seen it before so I know it can be done.
Printable View
I thought that by doing "Line 1" & Chr$(13) & "Line 2" etc, I might be able to generate multi-line tool tips, but it doesn't work.
Any idea how this is possible? I've seen it before so I know it can be done.
Someone posted a question about this before on this forum, and never go an answer, as no one knew how to do it. I have tried and failed as well.
Bugger.
:( :( :( :( :( :( :( :( :( :( :( :(
It's possible in VC but it's quite (very) complicated and relies on having version 4.70 or later of the (C?) common controls. If you've got MSDN, search for "tooltip NEAR multiline" in the VB documentation for their explanation. I would say that it's a limitation of VB so far and we've just got to live with it. Bummer.
Toot
Hi, I have a label, that has the same systemcolor as a tool tip, then I code it as visible=False, but on the mouseover I change it to visible=true. It's a workaround and user can't see it's not a tooltip!
André
Yeah, I've just been looking at building an OCX which comprises of a flat, multi-line textbox, with it's background and foreground colours changed to standard tooltips colours. Not an ideal solution but as you said, it's a reasonably successful work-around.
Thanks.
:)
'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 Form_MouseMove(Button As Integer, _
Shift As Integer, X As Single, Y As Single)
Label1.Visible = False
End Sub
Thanks. That's practically the same as I already got. It even has the same bug!
(If you move the mouse from the Command1 button over Label (i.e. the tooltip), then it doesn't disappear as a tooltip would.
:)
'mouse move in label and in form...works.
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 Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label1.Visible = False
End Sub
Private Sub Label1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label1.Visible = False
End Sub
Check out this url:
http://www.planet-source-code.com/vb...txtCodeId=7968
or just do a search on 'multi line tooltip'
Hope this helps