Hi,
Is it possible to know whether the veritical scrollbar of UltraTree is visible or not? The "Scrollable" property of ultraTree is "ShowIfNeed".
Here is a little background info:
In my App, if I delete a lot of nodes(which make vertical scrollbar invisible) then select the parentNode of the deleted nodes through "Selected" property, the nodes above the parentNode are hidden and there is no scrollbar. So in this case I need to set "TopNode" property to root node so that all nodes are visible.
Thanks.
Was this bug ever fixed? I believe I'm experiencing a similar problem using v10.2:
http://community.infragistics.com/forums/p/57152/291903.aspx#291903
It's definitly a bug... worked fine in 2008.2, broken in 2009.1
I've just reported it as such.
I'm also having the same problem. My wintree will look like this.
There are 2 more nodes before xls node. I have set the Scrollable property to 'ShowIfNeeded'.
If i delete the node after xls, the scrollbar is not visible.
If i change the Scrollable property to 'Show', after deleting the nodes, i move the mouse scrollbutton, then the scroll bar gets disabled. We are not able to view few of the top nodes(nodes before xls) .
Is there any way to show scrollbar?
Great thanks Brian! It works. In fact I use this piece of code:
private bool HasVerticalScrollbar(UltraTree treeview) { if (treeView != null) { Infragistics.Win.UIElement controlElement = treeView.UIElement; foreach (Infragistics.Win.UIElement element in controlElement.ChildElements) { Infragistics.Win.UltraWinTree.VerticalScrollbarUIElement scrollbar = element as Infragistics.Win.UltraWinTree.VerticalScrollbarUIElement; if (scrollbar != null) { return true; } } } return false; }
BTW, just for curiosity, when is the controlElement.ChildElements updated? It seems that Scrollbar is still in this collection immediately after I call "node.Remove()" for some nodes, is there a event in which the ChildElements of ultratree are already updated?
There should never be nodes that are inaccessible, so if I understood this correctly, this sounds like a bug, although I was not able to reproduce that behavior. If you can get the control into a state where there is no scrollbar but there are nodes that cannot be accessed, you should report it as a bug.
To answer your question, you can determine whether there is a vertical scrollbar currently being displayed in the following manner:
private bool? HasVerticalScrollBar( UltraTree treeControl ){ UIElement controlElement = treeControl != null ? treeControl.UIElement : null; if ( controlElement != null ) { foreach( UIElement element in controlElement.ChildElements ) { Infragistics.Win.UltraWinScrollBar.ScrollBarUIElement scrollBarElement = element as Infragistics.Win.UltraWinScrollBar.ScrollBarUIElement;
if ( scrollBarElement != null && scrollBarElement.Orientation == Orientation.Vertical ) return true; }
return false; }
return null;}