private void flowLayoutPanel1_Layout(object sender, LayoutEventArgs e) { flowLayoutPanel1.Controls[0].Dock = DockStyle.None; for (int i = 1; i < flowLayoutPanel1.Controls.Count; i++) { flowLayoutPanel1.Controls[i].Dock = DockStyle.Top; } flowLayoutPanel1.Controls[0].Width = flowLayoutPanel1.DisplayRectangle.Width - flowLayoutPanel1.Controls[0].Margin.Horizontal; flowLayoutPanel1.Controls[0].Height = flowLayoutPanel1.DisplayRectangle.Height/5; } |
- 스크롤 없이 Dock
for (int i = 0; i < flowLayoutPanel1.Controls.Count; i++) { flowLayoutPanel1.Controls[i].Width = flowLayoutPanel1.DisplayRectangle.Width - flowLayoutPanel1.Controls[0].Margin.Horizontal; flowLayoutPanel1.Controls[i].Height = ((flowLayoutPanel1.DisplayRectangle.Height) / this.flowLayoutPanel1.Controls.Count) - (flowLayoutPanel1.Controls[0].Margin.Vertical); } |
'.Net > Winform' 카테고리의 다른 글
PInvoke Interop Assistant - PInvoke 형식 자동으로 생성 (0) | 2014.04.22 |
---|---|
C# Winform 더블버퍼링 - DataGridView 깜빡임 해결 (0) | 2014.03.20 |
XmlDocument 클래스를 이용한 XML Read&Write (0) | 2014.03.10 |
다른 어셈블리에서 internal 접근하기 (0) | 2013.09.27 |
C# WebBrowser IE 버젼 변경 (0) | 2013.09.06 |