如何控制的WinForms为了对接 [英] How to control docking order in WinForms
问题描述
正如标题状态,我正在寻找一种方式来控制该项目停靠我控件顶部的顺序。
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.
我已经使用了与Windows窗体设计器,和我似乎无法找到什么 RightClick->&命令中─GT; SendToFront
是干什么的,因为多数民众赞成的究竟我想要的发生。至于我能得到的情况发生,因为我加我的内容我的控制,最新的内容总是在上面,我想为较新的内容是在底部,和最古老的内容是在。顶部
I've played with the windows form designer, and i cant seem to find what the RightClick->Order->SendToFront
is doing, because thats exactly what I want to happen. As far as I can get to happen, as I add my contents to my control, the newest contents is always at the top, and I'd like for the Newer contents to be on the bottom, and the oldest contents to be at the top.
的摘要:的有没有的WinForms一个简单的方法(C#),来控制哪些东西停靠的控制面的顺序?
Summary: Is there an easy way in WinForms (C#), to control the order in which things dock to the sides of controls?
的 修改的我有我添加我的控制,以从代码做到这一点的背后,我可以' T选用在WinForm的设计师的任何功能,但我所要做的,就是模仿的WinForms设计师 SendToBack
和 SendToFront
功能
推荐答案
使用这些方法:
myControl.SendToBack();
myControl.BringToFront();
这篇关于如何控制的WinForms为了对接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!