Results 1 to 3 of 3

Thread: Treeview

  1. #1

    Thread Starter
    Addicted Member VB6Coder's Avatar
    Join Date
    Apr 2001
    Location
    Northampton, UK
    Posts
    185

    Treeview

    When I edit a treeview node label that goes over the edge of the treeview, the last character is always only half displayed. If you then start to add more characters to the end of the existing label text, the end character still remains half displayed. It looks like the Label Edit control is to long or has an incorrect Z Order value.

    The Windows Explorer doesn't have this problem.

    How can I make sure that the last character of a node label is always visible when you add text to the end of the label during an edit?

  2. #2

    Thread Starter
    Addicted Member VB6Coder's Avatar
    Join Date
    Apr 2001
    Location
    Northampton, UK
    Posts
    185

    Unhappy

    Any ideas people?

  3. #3
    Lively Member floppes's Avatar
    Join Date
    May 2001
    Location
    Darmstadt, Germany
    Posts
    99
    You could enlarge the scroll bar with the api:

    Code:
    Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
    Private Const LB_SETHORIZONTALEXTENT = &H194
    
    ScrollBarLength = 2000 'You have to find a way how to find out the needed lenght
    Call SendMessage(TreeView1.hwnd, LB_SETHORIZONTALEXTENT, ScrollBarLength, 0&)
    This is only for a horizontal scroll bar, but I think LB_SETVERTICALEXTENT exists, too.

    I haven't tested it with a ListView, but it works with a List control.

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