Hi,

I'm filling a panel with a set of controls in OnLoad. Autoscroll is set to true. I want to scroll to the top but it never works. The same exact code does work however, when I execute the code when everything is up and running (for instance on a button press).

Is this an initialisation problem?

Code:
  
protected override void OnLoad(EventArgs e)
      {
      base.OnLoad(e);

      m_projects_split_main.Panel1.AutoScroll = true;

      // Set up filters;
      m_filter_comment3 = new FilterControlText("Comment 3");
      _AddProjectsFilter(m_filter_comment3);

      m_filter_comment2 = new FilterControlText("Comment 2");
      _AddProjectsFilter(m_filter_comment2);

      m_filter_comment1 = new FilterControlText("Comment 1");
      _AddProjectsFilter(m_filter_comment1);  

      m_filter_id            = new FilterControlText("Project id");
      _AddProjectsFilter(m_filter_id);
      
      // this code or equivalent (setting vscroll manually) does not work yet
      m_projects_split_main.Panel1.ScrollControlIntoView(m_filter_id);
      }

    private void _AddProjectsFilter(FilterControl i_filter)
      {
      i_filter.Dock = DockStyle.Top;
      m_projects_split_main.Panel1.Controls.Add(i_filter);
      i_filter.InputChanged += ActionFilterProjects;
      }
So only after everything is running, and I call ScrollControlIntoView again, then it does what's expected. Can anyone help please?