0

I have a limited space in my app where I have a label. In that label I am displaying different names based on date. The problem is that when the name is too long the name is cut off.

For example: string name = "Jacob Test" is okay but when string name = "Martinus Velikus Test" then label display ony Martinus Velikus T and the rest isn't displaying.

How do I make then text move from right to left? :)

Thank for any suggestions. Have a nice day.

TriX
  • 35
  • 5
  • 3
    Use a panel in location where you want the label to be, set it's AutoScroll property to true. Then place the label in the panel, anchor it and set it's AutoSize property to true. This will make the panel provide the scroll bars if the label's text extends outside of the panel. – duerzd696 Oct 28 '22 at 15:00
  • Another alternative would be to set AutoEllipsis for this label. Then you get a tooltip with the complete content when hoovering over it. – Ralf Oct 28 '22 at 15:04
  • 1
    https://stackoverflow.com/questions/59029664/news-ticker-with-moving-text-from-left-to-right?noredirect=1&lq=1 has an example for a Marquee style label. – Ralf Oct 28 '22 at 15:09
  • Learn how to use controls on panels including table layout panel with docking and anchors. You will be fine – T.S. Oct 28 '22 at 16:28
  • You could make the Label really large and set TextAlign to Right. – TaW Oct 28 '22 at 19:03

1 Answers1

1

Thanks @duerzd696 I used your way and it worked :)

TriX
  • 35
  • 5