[Solved]ScrollList and insert top to of list

I’ve follow Unity lesson which focused scrollist made by scrollrect and panel component and which uses buttons as content. However, how I can add new delegates on top of list ?

        GameObject newDelegate = Instantiate(rduCloseButton) as GameObject;
        rduDelegate rdelegate = newDelegate.GetComponent<rduDelegate>();
        var src = reporta.m_issuedTime.ToString(format);
        rdelegate.m_timeLabel.text = src;
        rdelegate.m_reportTitle.text = reporta.m_title;
        if (contentPanel != null)  {            
               newDelegate.transform.SetParent(contentPanel, false);
        }

This will add new delegates (aka buttons) to end of list.
.

You can add a “vertical layout group” component to your parent object of your buttons and change “child alignment” to “lower center”.

Wont work …

the order of items on a canvas is dictated by the sibling index (i.e. the order they appear in the hierarchy). You can set that value using

etc.

It helped, thanks.