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 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.
Sincerely,Tihomir TonevAssociate Software DeveloperInfragistics
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,
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.
UltraTilePanelNoScrollbar.zip
well i try but not work completly. Now i dont see the vertical scroll bar, but when i add tiles and for the tiles number need vertical scrollbar, its appeare and disappeare. Its a bit "annoying" see the vertical scroll bar flashing everytime the tiles number is more then i can see in the tilepanel.
Other prob about this solution is the tiles resizing, everytime the vertical scrool bar appeare/disappeare
My tilepanel size is 246x389, and every tile size i want to be 100x100. (about 2 columns + borders).
Every time i add the 9th tile (4th row), the vertical scrool bar flash and resizing all tiles. And when i go back under 9 again, all tiles resizing.
i think that can be 2 solutions:
1) the vertical scrool bar always exist but in hide mode
2) the vertical scroll bar always dont exist
its possibile one o these solutions?
tks a lot.
This method skips the drawing of the scrollbar, so i can't really see how it is flashing if it was never drawn from the beginning. My best guess would be that you are seeing another tile?
I have attached a sample adding 9 tiles per button click, but i see no scrollbar flashing.
Can you check the sample(its 17.2), and let me know if it behaves different on your end?
8255.UltraTilePanelNoScrollbar.zip
Hi, tks for reply.
i trace the error step by step.
The flashing is not for vertical scrollbar, but from the third tile that try to put horizontal and after goint to a new row.
i have max columns = 2, and the third tile try to site in the row for after shifting to a new row.
Also now my prob is changing to not see these "flash".
Can u hel pme?
I am not really sure how you are getting a third tile on the same row if your maximum number of columns is set to two. I have tried to reproduce that but i could not do it.
What would happen though, is that your tiles will be bigger than 100,100.
When you set the maximum number of columns, the tiles will stretch to take all the space. So if you have 2 tiles in a container of 246, the tiles will be probably around 110 each.
Maybe the only way the behavior your describe can happen is if the maximum number of columns is not set from the beginning, and you set it after you add tiles?