Results 1 to 10 of 10

Thread: TOOPTIPTEXT and carriage returns

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 1999
    Location
    flanders, nj 07836
    Posts
    110
    Basically just that.. Does anyone know how to make tooltiptext force a carriage return on a node view box ?

    It has to be done somehow because AOL's Instant messanger does it .. When I do I get that nasty "|" (pipe) looking type character when VBCRLF is not interprited the way you want it <grin>

    .. Anyone .. anyone... bueller, bueller?

  2. #2

  3. #3

    Thread Starter
    Lively Member
    Join Date
    May 1999
    Location
    flanders, nj 07836
    Posts
    110
    but then I completely loose the ease of my clients just hovering over information in the node and see a little bit more detail..

    If I use a form, I will move likely have to write in a OK or CLOSE type button for that form to close, unless I write the form to show somewhere away from the node view and have it auto disappear if there mouse leaves the node view.. or even auto update the form itself if they moved to another item in the view .. you know ? So I'm looking at an annoying undertaking.. aynone else have an idea?

  4. #4
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744
    ToolTip property doesn't alow you to create multiline ToolTip. You can use a label instead to show the tooltip.


    Code:
    Private Function TimeOut(pInterval As Single)
        Dim sngTimer As Single
        
        sngTimer = Timer
        Do While Timer < sngTimer + pInterval
            DoEvents
        Loop
    End Function
    
    
    Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
        lblToolTip.Visible = False
    End Sub
    
    
    Private Sub Text1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
        TimeOut 0.3
        lblToolTip.Caption = "This is a" & vbCrLf & "multilline ToolTip demo"
        lblToolTip.Left = Text1.Left + lblToolTip.Width
        lblToolTip.Top = Text1.Top + Text1.Height
        lblToolTip.Visible = True
    End Sub

  5. #5
    Fanatic Member Stevie's Avatar
    Join Date
    Mar 2000
    Location
    London, UK
    Posts
    565
    Serge, I have a tried your bit of code on a listview I have to show results from a database search.
    It works fine for a while, but if I keep the mouse moving over the listview for about 6-7 seconds I keep getting the folowing :

    Run-time error '28'
    Out of Stack Space

    Any idea why this is?

  6. #6
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744
    I see what the problem is. The MouseMove event is being fired too many times. Let's modify code a little.
    Code:
    Private Function TimeOut(pInterval As Single)
        Dim sngTimer As Single
        
        sngTimer = Timer
        Do While Timer < sngTimer + pInterval
            DoEvents
        Loop
    End Function
    
    
    Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
        lblToolTip.Visible = False
    End Sub
    
    Private Sub Text1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
        If lblToolTip.Visible = False Then
            TimeOut 0.3
            lblToolTip.Caption = "This is a" & vbCrLf & "multilline ToolTip demo"
            lblToolTip.Left = Text1.Left + lblToolTip.Width
            lblToolTip.Top = Text1.Top + Text1.Height
            lblToolTip.Visible = True
        End If
    End Sub

  7. #7

    Thread Starter
    Lively Member
    Join Date
    May 1999
    Location
    flanders, nj 07836
    Posts
    110
    so now how do I get the label to hover over the node view since forcing it to forground doesnt work.

  8. #8

    Thread Starter
    Lively Member
    Join Date
    May 1999
    Location
    flanders, nj 07836
    Posts
    110
    so now how do I get the label to hover over the node view since forcing it to forground doesnt work.

  9. #9
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744
    What so you mean, Hozo???

  10. #10
    Fanatic Member Stevie's Avatar
    Join Date
    Mar 2000
    Location
    London, UK
    Posts
    565
    Now don't I feel dumb!!

    Cheers Serge you're a star.

Posting Permissions

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



Click Here to Expand Forum to Full Width