Solved

Tooltipstext

Posted on 2000-04-27
4
206 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

724 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