フォームが 1 つあり、フォーム内にツールストリップ コントロールが 1 つあり、ToolStripMenuItem を動的に追加しています。私が欲しいのは、1つがいっぱいになったときに、アイテムが次の行にリストされることです。フォームの高さと幅を増やすためにこれを試しましたが、新しい行にアイテムを追加できませんでした。
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);
}
私が何を望んでいるのか理解できない場合はお知らせください。
どうすればこれを達成できますか。ありがとうございました。