|
-
Jun 15th, 2000, 04:35 PM
#1
Thread Starter
Addicted Member
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.
Visual Basic 6 Enterprise Edition + SP4
-
Jun 15th, 2000, 04:44 PM
#2
Fanatic Member
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.
Iain, thats with an i by the way!
-
Jun 15th, 2000, 05:11 PM
#3
Thread Starter
Addicted Member
Visual Basic 6 Enterprise Edition + SP4
-
Jun 15th, 2000, 05:34 PM
#4
Lively Member
No help...
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
Some cause happiness wherever they go; others, whenever they go.
-
Jun 15th, 2000, 06:05 PM
#5
Addicted Member
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é
-
Jun 15th, 2000, 06:22 PM
#6
Thread Starter
Addicted Member
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.
Visual Basic 6 Enterprise Edition + SP4
-
Jun 15th, 2000, 06:24 PM
#7
_______
walk around since real multiline is not possible
'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
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Jun 15th, 2000, 06:33 PM
#8
Thread Starter
Addicted Member
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.
Visual Basic 6 Enterprise Edition + SP4
-
Jun 15th, 2000, 07:45 PM
#9
_______
This works...
'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
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Jun 15th, 2000, 11:40 PM
#10
Lively Member
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|