PDA

View Full Version : New line in tiptext



lifeson
10-04-2008, 10:42 AM
Evening folks
I am using some code to fill out a listview box and want to display some tiptext

This works to show the tiptext
.ListItems(x).ListSubItems.Add , , , icon, tipText

Where the tiptext is made up of 3 strings:

rwDate
tipName
evtText

I have tried this :

tipText = rwDate & vbCr
tipText = tipText & tipName & vbCr
tipText = tipText & evtText
and this
tiptext = rwdate & vbnewline
tipText = tipText & tipName & vbNewLine
tipText = tipText & evtText
but they both give the tiptext as a single line of text, but i want the tiptext to shown on 3 seperate lines. Is this possible?:think:

Carl A
10-04-2008, 12:14 PM
Using a lablel set the color to Control Tip then use the list box mousemove Procedure: Example

Private Sub ListBox1_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)

If Y > 19 Then
Me.Label1.Visible = False
ElseIf Y < 5 Then
Me.Label1.Visible = False
Else
Me.Label1.Visible = True
End If

End Sub

Carl A
10-06-2008, 08:48 PM
I forgot to mention that you also need to check for the y value.
If the user moves laterally off the control the label will remain visible.