Search Unity

Question Listview does not show the first element added until you modify the height of the window

Discussion in 'UI Toolkit' started by CoryMaklin, Oct 8, 2021.

  1. CoryMaklin

    CoryMaklin

    Joined:
    Oct 10, 2020
    Posts:
    29
    When adding an item to the listView then calling Refresh, the item only appears after I modify the height of the window. Is there something I'm doing wrong?

    Code (CSharp):
    1. addModifierButton.clicked += () =>
    2.             {
    3.                 Create();
    4.                 listView.Refresh();
    5.                 listView.ScrollToItem(m_EffectDefinition.modifiers.Count - 1);
    6.             };
     
  2. CoryMaklin

    CoryMaklin

    Joined:
    Oct 10, 2020
    Posts:
    29
    I figured it out. My Mistake.