Results 1 to 7 of 7

Thread: Suppressing TreeView "ItemTips"?

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 1999
    Posts
    4

    Post

    Hi!
    My question has to do with how to suppress TreeView "ItemTips?" ... I may not be calling this property by it's correct name. What I'm referring to are the small yellow windows that display an entire TreeView item when the mouse pointer is positioned over an item that extends past the TreeView Window. They look similiar to the ToolTips but it appears their function is different. So, my question is how do you suppress these ItemTips? It seems reasonable that they'd be something you could turn off. I'd really appreciate any help anyone could give me.

    Thank you,
    Jennifer


  2. #2
    Fanatic Member
    Join Date
    Oct 1999
    Location
    MA, USA
    Posts
    523

    Post

    It seems to work fine for me without doing anythig. I just simply put a TreeView control on a form and that's it.
    What you could check is if Enabled Property of a TreeView is set to True.

    ------------------
    Visual Basic Programmer
    -----------------
    PolComSoft


    [This message has been edited by QWERTY (edited 11-04-1999).]

  3. #3

    Thread Starter
    New Member
    Join Date
    Nov 1999
    Posts
    4

    Post

    Actually my TreeView control is working fine - it's just that those ItemTips 'pop up' for those node items that extend past the TreeView window. The big problem I'm having with them arises when the number of characters in the node item text is greater than 80 characters. The ItemTip only displays 80 characters even if my TreeView window is wider than that.

    The only references I can find to "ItemTips" are for the TreeView control in Visual FoxPro -- which doesn't help me because I'm programming with VB 6 PRO.

    Also, I really think that the "ItemTips" are different than the ToolTips. I used this code to test it out:

    Private Sub tvTreeView1_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
        Dim n As Node
        Set n = tvTreeView1.HitTest(x, y)
        If Not (n Is Nothing) Then
           tvTreeView1.ToolTipText = "This is the text."
        Else
           tvTreeView1.ToolTipText = ""
        End If
    End Sub


    And the result was that both the ItemTip and the ToolTip were displayed.

    Jennifer


    [This message has been edited by JenniferW (edited 11-04-1999).]

  4. #4
    Addicted Member
    Join Date
    Jan 2001
    Location
    California
    Posts
    203
    I'm having the same problem, Did you ever figure this one out? I'de like to know.

    Thanks,

    M

  5. #5
    Junior Member
    Join Date
    Jan 2002
    Location
    Poole, UK
    Posts
    30
    Hiya

    I got this from somewhere else on the forums a while back .....took ages to find but works great.

    Just stick this in your declarations........

    'kill treeview tips

    Private Declare Function GetWindowLong Lib "user32.dll" Alias "GetWindowLongA" _ (ByVal hWnd As Long, ByVal nIndex As Long) As Long
    Private Declare Function SetWindowLong Lib "user32.dll" Alias "SetWindowLongA" _ (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long

    Const GWL_EXSTYLE = -20
    Const GWL_HINSTANCE = -6
    Const GWL_HWNDPARENT = -8
    Const GWL_ID = -12
    Const GWL_STYLE = -16
    Const GWL_USERDATA = -21
    Const GWL_WNDPROC = -4
    Const DWL_DLGPROC = 4
    Const DWL_MSGRESULT = 0
    Const DWL_USER = 8

    Const TVS_NOTOOLTIPS = &H80

    'end of kill treeview tips

  6. #6
    Member
    Join Date
    May 2002
    Location
    Yeovil/Bath
    Posts
    61
    is there any usage example for the above tips?

  7. #7

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