我有一个表单和内部表单我有一个工具条控件,并且我正在动态添加 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);
}
如果你不明白我想要什么,请告诉我。
任何建议我怎么能做到这一点。谢谢你。