Solved

Tooltipstext

Posted on 2000-04-27
4
203 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

840 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