Articles in this section

When I scroll a TreeViewAdv control with a gradient background, it is not rendered correctly. Why?

 

When the BackgroundColor style property is set to Gradient, you need to call Refresh method during both horizontal and vertical scrolling to ensure proper rendering.


C#

//Call Refresh during Horizontal and Vertical Scrolling
private void treeViewAdv1_VerticalScroll(object sender, System.Windows.Forms.ScrollEventArgs e) 
{  
   this.treeViewAdv1.Refresh(); 
}

//Call Refresh during Horizontal and Vertical Scrolling
private void treeViewAdv1_HorizontalScroll(object sender, System.Windows.Forms.ScrollEventArgs e)
{
   this.treeViewAdv1.Refresh();
}

VB

'Call Refresh during Horizontal and Vertical Scrolling
Private  Sub treeViewAdv1_VerticalScroll(ByVal sender As Object, ByVal e As System.Windows.Forms.ScrollEventArgs)  
Me.treeViewAdv1.Refresh() 
End Sub   

'Call Refresh during Horizontal and Vertical Scrolling
Private  Sub treeViewAdv1_HorizontalScroll(ByVal sender As Object, ByVal e As System.Windows.Forms.ScrollEventArgs)  
Me.treeViewAdv1.Refresh() 
End Sub

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Access denied
Access denied