ToolStripStatusLabel.cs 695 B

123456789101112131415161718192021222324252627282930313233
  1. using System.Drawing;
  2. namespace System.Windows.Forms
  3. {
  4. public class ToolStripStatusLabel : ToolStripLabel
  5. {
  6. private bool spring;
  7. public bool Spring
  8. {
  9. get => spring;
  10. set
  11. {
  12. spring = value;
  13. if (value)
  14. AutoSize = false;
  15. }
  16. }
  17. public override void ApplyStyle(ToolStripProfessionalRenderer r)
  18. {
  19. label.Foreground = r.StatusBarForeground;
  20. }
  21. public ToolStripStatusLabel() : base()
  22. {
  23. }
  24. public ToolStripStatusLabel(Image image) : this()
  25. {
  26. Image = image;
  27. }
  28. }
  29. }