How to create scrolling input textfield using UI

in Unity 4.6.6

problems in my project are

1.Cursor is not masking

2.Scrollbar size is automatically become 0 to 1 size

3.Scrollbar is not working after assigning in "Scroll Rect".

Here is my sample project

Thanks in advance .


1 Answer 1


I have not looked in your sample but you want to create panel within your canvas. I name mine ScrollView and attached is the Scroll Rect and mask. set the scroll rect to verticle, elasticity to .1 and sensitivity to around 25. It is important that the Content of scrollview is filled with the container panel that will be a child of the View panel. Also is important if you want a scrollbar that you place it as a child of the view panel then click the view panel and drag the bar to vertical scrollbar within the scroll rect

If you don't have a container panel as a child to the ScrollView create one and within the Container panel Add a grid layout group and set the start corner to upperleft the start axis to verticle the child alignment to uppercenter and constraint to fixed column count, set constraint count to 1.

Next add to the container panel a content size fitter and set verticle fit to min size and horizontal to uncontrained also the rect transform of the container panel set Pivot Y to 1 so it starts at the top of the list.

After this is all set up anything that is a child of the container panel(Multiple created text objects, input fields, images or even Instantiated panels) should scroll just fine and be fitted perfectly in the container.

  • \$\begingroup\$ Thank you for answer . This solution help to improve my scroll input field . But it have some problems . 1 ) Cursor is not masking . 2) Cannot see and scroll all typed texts , after reaching some limit. Only few texts can view and edit \$\endgroup\$ Commented Jul 8, 2015 at 10:23
  • \$\begingroup\$ I am not sure what you mean by cursor not masking because the cursor should be visible. You can uncheck show mask graphic and also the image on Scroll Container. The grid layout group controls the cell size of each of the items in the list(mine is currently at X440 and Y200) A few adjustments to this and the font size of your input fields should let you see the texts properly. I have not reached a limit on the scroll lists but if you can explain your issue there in a new question I can maybe help answer that better. \$\endgroup\$ Commented Jul 8, 2015 at 14:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .