Solved

Tooltipstext

Posted on 2000-04-27
4
199 Views
Last Modified: 2010-05-02
I want a tooltipstext to apper over a control, for this part it ok. But where I have some troubles, it when I want to make it multi-line tooltipstext, It seem that you can only make it a single line. If someone know how to make a tooltipstext multi-line please tell me.
0
Comment
Question by:Francois_P
  • 2
4 Comments
 
LVL 1

Accepted Solution

by:
vbWayne earned 25 total points
ID: 2754988
'tooltips text can only be single line
'here is a walk around

'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

'create a form with a command button (command1)
'and a label (label1)
'
'copy & paste this code into the app
'
Option Explicit

Private Sub Form_Load()
   Label1.BackColor = &H80000018
   Label1.BackStyle = 1
   Label1.BorderStyle = 1
   Label1.AutoSize = True
   Label1.Visible = True
   
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
0
 
LVL 1

Expert Comment

by:PeterDobson
ID: 2754999
I'm not sure if you can, but a way around it is to set the tool tip property to "" and then fake a tool tip by setting a yellow label's visible property to true for in the mouse move event of the control in question. I use this method when creating activeX controls as the tool tips dont work!
0
 

Author Comment

by:Francois_P
ID: 2755009
Thank, this was exactly what I was looking for!
0
 
LVL 1

Expert Comment

by:vbWayne
ID: 2755034
Glad to help.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now