|
-
Nov 29th, 2000, 08:27 AM
#1
Thread Starter
Junior Member
Hi Friends,
I'd like to know how to show two or more lines in ToolTipText as we have when pointing to a Word file in Windows Explorer. I've tried VbCr and VbCrLf but none has worked.
Thanks in advance for any help.
Fernando.
-
Nov 29th, 2000, 08:33 AM
#2
_______
<?>
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
'use this code in any control near the label as you want to capture
'the event when off the label
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
-
Nov 29th, 2000, 08:35 AM
#3
Frenzied Member
Check this great example for a lot of tooltip-madness 
http://perso.wanadoo.fr/vbfrood/engl...s/tooltips.htm
Jop - validweb.nl
Alcohol doesn't solve any problems, but then again, neither does milk.
-
Nov 29th, 2000, 08:39 AM
#4
Fanatic Member
Take a look at the following site:
http://welcome.to/fastlib
This has loads of controls, free!!!!! and one is a multiline baloon type tooltip.
Well worth a visit.
-
Nov 29th, 2000, 10:13 AM
#5
Excellent....
Just as an added thought...
take out the Label1.BackStyle = 0
then...
set Autosize = true
Alignment = 2 - Center
Appearence = 0 - Flat
BackColor = &H00C0FFFF&
Backstyle = 1 - Opaque
Borderstyle = 1 - Fixed Single
This way it 'Looks' like tooltip!
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
-
Nov 29th, 2000, 10:18 AM
#6
ooo!
Just started to "play" with the code....
change:
Code:
Label1.Top = Command1.Top + Command1.Height
Label1.Left = Command1.Left + Command1.Width / 2
to:
Code:
Label1.Top = Command1.Top + Command1.Height + Y
Label1.Left = Command1.Left + X
Then the ToolTag follows the mouse and appears a 'little' more natural
Just having fun!
:P
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
-
Nov 29th, 2000, 10:30 AM
#7
Ok..I am going a little 'Nuts' But.....
I found a problem:
A label cant be 'Over' any controls!
Therefore in a restricted space (lots of othe buttons etc) it wont show up..it will be partially under something else:
Workaround!
Create a frame...then drop the Label1 into the frame.
ste the frame to have:
No border
Visible = false
Then put this in:
Code:
Label1.Left = 0
Label1.Top = 0
Frame1.Width = Label1.Width
Frame1.Height = Label1.Height
Frame1.Top = Command1.Top + Command1.Height + Y
Frame1.Left = Command1.Left + X
Frame1.Visible = True
Be sure to re-set the label1.visible back to true
then wherever it says Label1.visible change it to Frame1.visible. (because when the frame is not visibel...neither are any controls in it)
Viola! You have a Tooltip...multiline...floating over other controls!
Hope this is of USE to SOMEONE! 
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
-
Nov 29th, 2000, 10:34 AM
#8
_______
<?>
Code I had but don't use.
I'll add your changes to it.

"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
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
|