'To Paint border for nodes
Private Sub multiColumnTreeView1_BeforeNodePaint(ByVal sender As Object, ByVal e As TreeNodeAdvPaintEventArgs)
e.Graphics.DrawLine(Pens.Red, New Point(0, e.Node.Bounds.Y), New Point(Me.multiColumnTreeView1.Width,e.Node.Bounds.Y))
End Sub
'To Paint border for sub nodes.
For i As Integer = 0 To Me.multiColumnTreeView1.Nodes.Count - 1
For j As Integer = 1 To Me.multiColumnTreeView1.Nodes(i).SubItems.Count - 1
Me.multiColumnTreeView1.Nodes(i).SubItems(j).BorderColor = Color.Red
Me.multiColumnTreeView1.Nodes(i).SubItems(j).BorderSingle = System.Windows.Forms.ButtonBorderStyle.Solid
Me.multiColumnTreeView1.Nodes(i).SubItems(j).BorderStyle = BorderStyle.FixedSingle
Me.multiColumnTreeView1.Nodes(i).SubItems(j).BorderSides = Border3DSide.Top
Next j
Next i
'Alternate row color.
For i As Integer = 0 To Me.multiColumnTreeView1.Nodes.Count - 1
If i Mod 2 <> 0 Then
Me.multiColumnTreeView1.Nodes(i).Background = New Syncfusion.Drawing.BrushInfo(Syncfusion.Drawing.GradientStyle.None, System.Drawing.SystemColors.WindowText, System.Drawing.Color.FromArgb((CInt(Fix((CByte(0))))), (CInt(Fix((CByte(192))))), (CInt(Fix((CByte(0)))))))
For j As Integer = 1 To Me.multiColumnTreeView1.Nodes(i).SubItems.Count - 1
Me.multiColumnTreeView1.Nodes(i).SubItems(j).Background = New Syncfusion.Drawing.BrushInfo(Syncfusion.Drawing.GradientStyle.None, System.Drawing.SystemColors.WindowText, System.Drawing.Color.FromArgb((CInt(Fix((CByte(0))))), (CInt(Fix((CByte(192))))), (CInt(Fix((CByte(0)))))))
Next j
End If
Next i
|