从面板中心动态定位控件
我有一个宽度 x 高度为 1200 x 550 的面板。在这个面板中,我在运行时动态添加了控件。我想知道,是否可以从面板中心动态定位控件,并且随着每个新控件的添加,以前的控件的位置也会动态地重新定位。有人能给我建议吗?我现在有点模糊哦呵呵呵呵。
非常感谢您的关注。
I have a panel with its width x height is 1200 x 550. In this panel, I added controls dynamically during runtime. I was wondering, if I could dynamically position the controls from the center of the panel and as each new control added, the position of the previous controls would also dynamically reposition itself. Can anybody suggest me something? I am kinda blurred right now ohohohoho.
Thank you very much for your kind attention.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我让 TableLayoutPanel 中的内容居中的方法是添加两个额外的列或行,并将它们分别设置为 50%。外部两列之间的任何列或行将根据百分比自动居中。当然,此选项最适合设置为特定大小或自动调整类型的列或行。
The way I get stuff to center in the TableLayoutPanel is to have two extra columns or rows that I have set to 50% each. Any columns or rows between the two on the outside will automatically center based on the percentage. Of course, this option works best with columns or rows that are set to specific sizes or for auto adjust types.