12

I have a StatusStrip control on a form. This control contains only one child control - it is ToolStripStatusLabel. When the text is too large, then nothing is displayed. I would prefer to display at least something instead of nothing. What should I do with ToolStripStatusLabel to display part of text even if the whole text doesn't fit?

Bogdan Verbenets
  • 25,686
  • 13
  • 66
  • 119

1 Answers1

16

Try setting the Spring property to true:

toolStripStatusLabel1.Spring = true;

or as Hans pointed out, you can set the ToolStripLayoutStyle

statusStrip1.LayoutStyle = ToolStripLayoutStyle.Flow;
LarsTech
  • 80,625
  • 14
  • 153
  • 225
  • 5
    Changing the strip's LayoutStyle to Flow keeps the text left-aligned. – Hans Passant Sep 06 '12 at 17:19
  • with statusStrip1.LayoutStyle = ToolStripLayoutStyle.Flow; also set statusStrip1.AutoSize= false; To make sure that status bar size is fixed (this is what standard applications follow) – HN Learner Mar 31 '17 at 05:25