PDA

Click to See Complete Forum and Search --> : Treeview


VB6Coder
May 16th, 2001, 03:08 AM
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?

VB6Coder
May 17th, 2001, 10:47 AM
Any ideas people?

floppes
May 19th, 2001, 10:32 AM
You could enlarge the scroll bar with the api:


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.