0
我有一種形式和內部形式,我有一個工具欄控件,並且我正在動態添加ToolStripMenuItem。 我要的是當一個人被填滿,項目應在下一行列出。 我試圖增加窗體的高度和寬度,但在新行中沒有發生添加項目。當ToolStrip裏面填充一行時,在新行中添加ToolStripMenuItem
ToolStripItemCollection t_col = toolStripTaskBar.Items;
int _howMany = t_col.Count;
Rectangle mi_bounds = t_col[_howMany - 1].Bounds;
if (this.Width < (mi_bounds.X + mi_bounds.Width))
{
int minimumFormHeight = 80;
this.MinimumSize = new Size((mi_bounds.X + mi_bounds.Width), minimumFormHeight);
}
讓我知道如果你不明白我想要什麼。
任何建議我怎麼能實現這一點。 謝謝。