Search code examples
winformsstatusstrip

The StatusLabel is cut when width of another StatusLabel is changed (problem with the Spring property)


I have four items in my StatusStrip:

  1. StatusLabel with dynamic width
  2. StatusLabel with Spring property set to True (to fill the remaining space)
  3. StatusLabel with dynamic width
  4. a custom StatusStrip control with fixed with

The second one is there because I want to align the last two items to the right, and it will do that (found it on SO).

When I change the text of the first StatusLabel, it will correctly change the width of it, but then the third StatusLabel gets cut, I don't know why...

Without changing the text it behaves well: Good

But when the text is changed... Bad

Probably the width of the spacer StatusLabel (the second one) remains the same, which - I think - shouldn't. What do You think? How to solve this?


Solution

  • The Spring property doesn't always work properly if it isn't on the far right.

    See Probem with StatusStrip...Help needed