Search Unity

Window Overflow Issues

Discussion in 'UI Toolkit' started by msfredb7, Apr 28, 2019.

  1. msfredb7

    msfredb7

    Joined:
    Nov 1, 2012
    Posts:
    168
    Hello ! I'm trying to learn UIElements by making an Editor Window and I have a problem:
    Context: My content height is bigger than the window's height
    Behavior: The content's height is squeezed so that everything fits in
    Expected behavior: The content overflows and a scroll bar is dynamically added (basically the old IMGUI behavior)

    How can I achieve this ? I tried messing around with the root's overflow settings but it keeps squeezing the content instead of allowing overflow.

    Thanks !
     
  2. uMathieu

    uMathieu

    Unity Technologies

    Joined:
    Jun 6, 2017
    Posts:
    398
    UIElements doesn't support overflow:scroll for now. You need to explicitly add your content into a ScrollView. This way, the scrollbar will be added when your content is larger than the ScrollView area.
     
  3. msfredb7

    msfredb7

    Joined:
    Nov 1, 2012
    Posts:
    168

    Thank you! That worked perfectly :)