C#巧用anchor和dock设计复杂界面(控件随着窗体大小的变化而变化)
2009-06-16 15:38
711 查看
窗体不变,panel1和pannel2相对变化,button也变化
private void splitContainer1_SplitterMoved(object sender, SplitterEventArgs e)
{
int length = this.tabControl1.Width / 4;
int s = length * 3 / 4;
button3.Width = s;
button4.Width = s;
button5.Width = s;
button6.Width = s;
button4.Location = new Point(button3.Location.X + length, button3.Location.Y);
button5.Location = new Point(button4.Location.X + length, button4.Location.Y);
button6.Location = new Point(button5.Location.X + length, button5.Location.Y);
}
经过如上设置,我们的窗体界面就设计好了。我还是菜鸟,有理解不对的地方,还恳请大家指证。
15:30:11
源码可以到http://finallyliuyu.download.csdn.net/下载
没有CSDN号的朋友可以http://www.cnblogs.com/finallyliuyu/admin/Files.aspx下载
private void splitContainer1_SplitterMoved(object sender, SplitterEventArgs e)
{
int length = this.tabControl1.Width / 4;
int s = length * 3 / 4;
button3.Width = s;
button4.Width = s;
button5.Width = s;
button6.Width = s;
button4.Location = new Point(button3.Location.X + length, button3.Location.Y);
button5.Location = new Point(button4.Location.X + length, button4.Location.Y);
button6.Location = new Point(button5.Location.X + length, button5.Location.Y);
}
经过如上设置,我们的窗体界面就设计好了。我还是菜鸟,有理解不对的地方,还恳请大家指证。
15:30:11
源码可以到http://finallyliuyu.download.csdn.net/下载
没有CSDN号的朋友可以http://www.cnblogs.com/finallyliuyu/admin/Files.aspx下载
相关文章推荐
- C# 巧用anchor和dock设计复杂界面(控件随着窗体大小的变化而变化)【转】
- C#中怎样使控件随着窗体一起变化大小(常见困难以及修正)[转]
- C#中怎样使控件随着窗体一起变化大小(常见困难以及修正)
- C#中怎样使控件随着窗体一起变化大小(常见困难以及修正)
- C#中怎样使控件随着窗体一起变化大小(常见困难以及修正)
- C#中怎样使控件随着窗体一起变化大小(常见困难以及修正)
- C#:控件随着窗体一起变化大小
- C# ——窗体和控件随着分辨率的变化自适应大小
- C# Winform 界面中各控件随着窗口大小变化
- C#控件随着窗口大小变化而自动变化
- 如何让窗体大小随着控件的大小变化而变化
- C# winform 布局,最大化之后再还原,内部其他控件大小怎么随着变化。
- 如何让窗体大小随着控件的大小变化而变化
- C#控件随着窗口大小变化而自动变化
- C# 界面布局之Dock,Anchor,容器控件心得
- C#窗体控件大小随窗体变化而变化的一种改进方法
- CFormView上让控件的大小随着窗体的变化而自动适应
- C#中怎么使控件随着窗体的大小改变而改变
- C#中怎样让控件大小随着窗体大小变化而变化?
- CFormView上让控件的大小随着窗体的变化而自动适应