Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用Dock = DockStyle.Top. 我希望后续控件出现在现有控件下方。默认情况下,添加的每个新控件都位于顶部。是否有捷径可寻?
Dock = DockStyle.Top
编辑:我在运行时添加这些控件,而不是设计。
它永远不会失败。我自己刚刚发现了一个答案,但对于后来发现这个问题的其他人来说,答案是调用.SetChildIndex(ctrl, 0)容器。
.SetChildIndex(ctrl, 0)