Consulting

Results 1 to 3 of 3

Thread: New line in tiptext

  1. #1
    VBAX Tutor
    Joined
    Dec 2006
    Posts
    271
    Location

    New line in tiptext

    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
    [vba].ListItems(x).ListSubItems.Add , , , icon, tipText[/vba]

    Where the tiptext is made up of 3 strings:

    rwDate
    tipName
    evtText

    I have tried this :

    [vba]tipText = rwDate & vbCr
    tipText = tipText & tipName & vbCr
    tipText = tipText & evtText[/vba]
    and this
    [vba]tiptext = rwdate & vbnewline
    tipText = tipText & tipName & vbNewLine
    tipText = tipText & evtText[/vba]
    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?

  2. #2
    VBAX Tutor
    Joined
    Dec 2006
    Posts
    220
    Location
    Using a lablel set the color to Control Tip then use the list box mousemove Procedure: Example
    [vba]
    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
    [/vba]
    "Intellectual passion occurs at the intersection of fact and implication."

    SGB

  3. #3
    VBAX Tutor
    Joined
    Dec 2006
    Posts
    220
    Location
    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.
    "Intellectual passion occurs at the intersection of fact and implication."

    SGB

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •