我需要设置一个等于ToolStripButton.Left值的panel.Left属性:
pan1.Left = btn1.Left;
但是ToolStripButton没有这样的属性。有什么解决办法吗?
如果没有-如何将面板放置在窗体的中心。
发布于 2012-06-18 16:33:25
你不需要任何类型的control
来推断中心,而是形成它自己:
panel1.Left = this.ClientSize.Width / 2 - panel1.Width / 2;
发布于 2012-06-18 19:22:25
这是可行的:
pan1.Location = new Point(btn1.Bounds.X,pan1.Location.Y);
https://stackoverflow.com/questions/11079006
复制相似问题