Completed
Last Updated: 05 Jun 2014 07:08 by Svetlin
Svetlin
Created on: 22 Jun 2012 06:21
Category: TreeView
Type: Bug Report
0
FIX. Wrong appareance of the vertical scroll bar when nodes are added programmatically
If you add nodes in the following manner:

  Private arCategories() As String = {"Not Used", "Category1", "Category2", "Category3", "Category4", "Category5"}

  Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Dim node As RadTreeNode

    node = Me.RadTreeView1.Nodes.Add(arCategories(1))
    node.Image = My.Resources.img1
    AddItems(node)

    node = Me.RadTreeView1.Nodes.Add(arCategories(2))
    node.Image = My.Resources.img2
    AddItems(node)

    node = Me.RadTreeView1.Nodes.Add(arCategories(3))
    node.Image = My.Resources.img3
    AddItems(node)

    node = Me.RadTreeView1.Nodes.Add(arCategories(4))
    node.Image = My.Resources.img4
    AddItems(node)

    node = Me.RadTreeView1.Nodes.Add(arCategories(5))
    node.Image = My.Resources.img5
    AddItems(node)

    For Each nd As RadTreeNode In Me.RadTreeView1.Nodes
      For Each n As RadTreeNode In nd.Nodes
        n.Image = nd.Image
      Next
    Next
  End Sub

  Private Sub AddItems(ByVal node As RadTreeNode)
    For i As Integer = 1 To 4
      node.Nodes.Add("Item" & i)
    Next
  End Sub

the vertical scroll is not calculated correctly.
0 comments