autoscroll panel to bottom

后端 未结 3 1940
灰色年华
灰色年华 2020-12-20 14:22

i have a panel in my winforms and in it i load some usercontrols .

i would like to autoscroll to the bottom of the panel( as my panel fills ) everytime a new userco

3条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-20 15:10

    You could use ScrollControlIntoView and pass the control you last added.

    An alternate solution would be:

    panel.VerticalScroll.Value = panel.VerticalScroll.Maximum
    

提交回复
热议问题