Quantcast
Channel: Windows Forms General forum
Viewing all articles
Browse latest Browse all 12583

Adding ToolStripItem Dynamically and AutoSize

$
0
0

My application adds ToolStripItems to a ToolStrip dynamically, however the size of the ToolStrip is not always correct.  The ToolStrip's width sometimes falls short, creating the "extra" dropdown icon that displays the rest of the ToolStripItems.  I have tried both ToolStrip.Items.Add() in a for loop, and ToolStrip.Items.AddRange(), but this effect still occurs.

The ToolStrip is inside a ToolStripContainer, and the container is set to SuspendLayout, but I believe this property is so the controls won't jump around.

Any thoughts/ideas?


Viewing all articles
Browse latest Browse all 12583

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>