Search Unity

[Solved] ScrollRect + input fields positionning

Discussion in 'UGUI & TextMesh Pro' started by florent-morin, Jun 10, 2015.

  1. florent-morin

    florent-morin

    Joined:
    Dec 2, 2014
    Posts:
    12
    Hello,

    This is my problem.

    I have a Panel with a ScrollRect. (container)
    Inside my container, another panel which scroll. (content)
    Inside the content panel, I use Autolayout. A vertical layout with gameobjects (padding = 20).
    Each game object has an vertical layout with a text and an input field (padding = 5, total height = 70)

    When input field has focus, I want the parent game object to be visible at the top of scroll, due to keyboard.
    I currently use verticalNormalizedPosition to do that. But its value is from 0 (bottom) to 1 (top)...

    And I don't know how to scroll to a specific item.

    Thanks.
     
  2. florent-morin

    florent-morin

    Joined:
    Dec 2, 2014
    Posts:
    12