How to control docking order in WinForms

前端 未结 8 942
独厮守ぢ
独厮守ぢ 2020-12-25 09:20

As the title states, I\'m looking for a way to control the order in which the items dock to the top of my control.

I\'ve played with the windows form designer, and

8条回答
  •  南方客
    南方客 (楼主)
    2020-12-25 09:58

    As you said, the newest control added to the controls collection is the one on top. If you need a newer control to be added at the bottom, I'll suggest to create a list of controls, add the controls to the list, reverse the list and add the list to the controls collection.

    List controls = new List

提交回复
热议问题