Hi guys, i try with other topic to show the scroll bars in a ultratilepanel, (and tks again), but i dont like this solution.
when i add tils the bar appear and hide again, now i want try to hide completly th scrollbars.
i scroll the tiles with the central button without scrollbars, its possibile?
i dont wanna that the scrll bar use the space into tilepanel.
tks for help.
Hello,
You can use the sample that Andrew provided and remove the ScrollBar regardless of mouse position at all times. This will not remove the scrolling functionality of the control, so you can still use the mouse wheel to vertically scroll the content.
While this will make the control a little bit smaller, you can add some value to the width to compensate for it.
int scrollWidth = this.ultraTilePanel1.ScrollBarLook.GetVerticalScrollBarWidthResolved(this); this.ultraTilePanel1.DrawFilter = new TilePanelDrawFilter(); ultraTilePanel1.Width += scrollWidth + 5; -> there is always some space between the scrollbar and the control which is calculated internally, however adding few pixels will compensate for it.
And have the DrawFilter Always skip the drawing of the VerticalScrollBar:
public class TilePanelDrawFilter : IUIElementDrawFilter { public bool DrawElement(DrawPhase drawPhase, ref UIElementDrawParams drawParams) { return true; }
public DrawPhase GetPhasesToFilter(ref UIElementDrawParams drawParams) { if (drawParams.Element.GetType().Name == "VeritcalScrollBarUIElement") { return DrawPhase.BeforeDrawElement; } else { return DrawPhase.AfterDrawElement; } } }
Middle mouse button is not incorporated by default, so scrolling with it will be a feature request.
Sincerely,Tihomir TonevAssociate Software DeveloperInfragistics
UltraTilePanelNoScrollbar.zip
Hi, tks to reply:
his is the prev topic:
https://es.infragistics.com/community/forums/f/ultimate-ui-for-windows-forms/121288/ultratilepanel-autohide-scrollbar
i wanna add tiles with a specific size, automatically when i dont see all tiles the vertival scrollbar appeare.
With prev topic i can hide when i m not over the tile panel, but not looks good, also i wanna try to hide always the vertical scrool bar.
tks for help
Hello Luca,
By default UltraTilePanel does not come with a vertical scrollbar, as it resizes the content of it to fit all tiles. I suppose you have added a WinScrollBar or another panel in order to have a scrollbar, but there is no information in this topic how you have achieved that.
If this post is related to another topic, please post a link to it, or reply on the related topic, as the context in this case seems to be holding important information.
Looking forward to your reply.