- Home /
Scrolling created buttons
Hello everyone,
So I have the UI setup like this...
Now the problem is how do i create x buttons and when the panel gets full it starts to make it scrollable. Each button would have a diffrent symbol and purpose...
I tried setting it up simmilar to how i would scroll a text with a masked image, but with added content sized panel and inside the panel a button. But it doesn't seem to work...
Can you describe the problem a little more, I know buttons can have issues with scrolling as the button detects the mouse click (blocking a mouse drag) but it's not clear if this is the case with your setup.
The problem is buttons won't scroll like they should. Ie. when i add more buttons to that bar they are all visible, also when i drag them to the left they move beyond the designated scrolling rect and are still visible. The bar also doesn't adjust itself when i add more buttons. It's completely broken(i another project i made text scroll simmilar to this and it worked)
Answer by fafase · Mar 09, 2015 at 10:56 AM
Best solution here is to make it scrollable from the start, only increase the size of the box as new items come in.
You could lock the elasticity of the scroll if the box is smaller than the width of the screen but I would not even bother about this. If you move a scroll rect that is smaller than the screen it automatically gets back to initial position.
Your answer
![](https://koobas.hobune.stream/wayback/20220613185455im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
UI Buttons Stop Working After I Load Another Scene And Then Come Back. 4 Answers
Touch input problem 1 Answer
Buttons stopped working after I temporarily changed the font. 1 Answer
Inventory UI buttons not working 1 Answer
4.6 UI Dynamic button event system PointerEnter, PointerExit, PointerUp etc. 1 Answer