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);
}
让我知道如果你不明白我想要什么。
任何建议我怎么能实现这一点。 谢谢。