EnsureVisible in TreeView: how to ensure that horiz. scrollbar is aligned left
Posted on 2009-03-31
I have a tree view with eg. following nodes
+-- # Anne Charles, Hillroad 14, 7766 MyTown, My Country
+-- # Steve Jones, Forestroad 12, 7766 MyTown, My Country
With the command
I can ensure that "Anne Charles" is visible within the treeview. My problem is: If the treeview is not wide enough to show the complete node text of this node, the horizontal scroll bar is automatically moved to the right so that node structure shown left from the "A" in the text "Anne Charles" is not visible any more. Thus
Anne Charles, Hillroad 14, 7766 MyTown, My Country
Steve Jones, Forestroad 12, 7766 MyTown, My Country
is visible and the node structure is hidden.
Question: How can I ensure that the node "Anne Charles" is visible and also the horizontal scrollbar is aligned to the left, which means that the node structure left from the text is still visible?
[Visual Basic .net 2005]