J-P
J-P

Reputation: 403

Show the rest of the text in label when label size is smaller than text length

Hi I have a label that contain text but the label has to be in fix size but the text doesn't not, I'm trying to produce the behavior of Windows when you for example Right Click on a folder and click on Properties to see the complete path, but if the path was bigger than the label you can highlight it and move to the end and you can see the rest of the text. How can I do this with Winforms c#. thanks.

enter image description here

Upvotes: 1

Views: 109

Answers (1)

Reza Aghaei
Reza Aghaei

Reputation: 125302

You can use a TextBox and set the ReadOnly property of it to true and its BorderStyle to None.

enter image description here

Upvotes: 1

Related Questions