We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Unable to scroll MultiColumnTreeView programmatically

I do not seem to be able to scroll the control via code. Nothing I have tried works thus far works. If anyone could help shed some light on this matter I would be very grateful. I have provided the method which is supposed to scroll the tree into view below:

[Code]
private void ChangeTreeNodeAppearance(TreeNodeAdv node, Color foregroundColour, ImageIndex index)
{
if (m_EditorWndTreeView.InvokeRequired)
{
Invoke(new ChangeTreeNodeAppearanceDelegate(ChangeTreeNodeAppearance), new object[] { node, foregroundColour, index });
}
else
{
if (!node.IsVisible)
{
node.BringIntoView(); // Does not work
m_EditorWndTreeView.EnsureVisible(node); // Does not work
m_EditorWndTreeView.EnsureVisibleV(node, false); // Does not work

// This did not work
if (node.Parent != null)
{
m_EditorWndTreeView.Nodes[node.Parent.Index].Nodes[node.Index].BringIntoView();
m_EditorWndTreeView.Refresh();
}
else
{
m_EditorWndTreeView.Nodes[node.Index].BringIntoView();
}

// This did not work either.
m_EditorWndTreeView.SelectedNode = node;
m_EditorWndTreeView.SelectedNode.BringIntoView();
}

node.TextColor = foregroundColour;
node.SubItems[(int)MultiSelectTreeView.ColumnIndecies.BuildStatus].LeftImage = index == ImageIndex.Nothing ? null : m_ImageList.Images[(int)index];
m_EditorWndTreeView.Refresh();
}
}
[/Code]


1 Reply

VS Vallarasu S Syncfusion Team February 18, 2011 06:58 PM UTC

Hi Philip ,

Thanks for your interest in Syncfusion products.

The methods you have specified works [BringIntoView,EnsureVisible] fine here, I have attached the sample used to test the behavior with this thread.

Please ensure this on your end and let me know the details on your product version if this fails.

Regards
Vallarasu S.




MCTree_11c3b9eb.zip

Loader.
Live Chat Icon For mobile
Up arrow icon