Whenever i place a treetriew in a project, a horizontal scrollbar apears. It's not needed, it looks ugly and i can't get ridd of it... Anyone has a sollution?
Printable View
Whenever i place a treetriew in a project, a horizontal scrollbar apears. It's not needed, it looks ugly and i can't get ridd of it... Anyone has a sollution?
Anyone?
How about setting the Scrollable property to false?
i do need the vertical one :-)
The horizontal one is useless. It's there but u can't click it (slider doesn;t move) and i want to get ridd of it since it looks like ****.
This more of workaround and I'm sure there is someway to totally eliminate the scrollbar.
Try in your Form_Load event
TreeView1.ExpandAll()
TreeView1.CollapseAll()
It eliminates the horizontal scroll unless the tree expands beyond the borders of the control. This way you can still have the vertical scroll and only have the HScroll when necessary.
doesn't work..
check the screenshot...
Let me do some more digging.
It appears if you load your nodes at runtime, the scrollbar does not show
Dim i As Integer
For i = 0 To 20
Dim nd As New TreeNode()
nd.Text = "node" & i.ToString
If i Mod 4 = 0 Then
Dim nd2 As New TreeNode()
nd2.Text = "child" & i
nd2.Checked = True
nd.Nodes.Add(nd2)
End If
TreeView1.Nodes.Add(nd)
Next
Let me know if this doesn't work. This is the only way I can consistantly NOT have the HScroll.