How to put newline in label control in c#?
i develop movie booking ticket software, in that when i click on seat picturebox the no of seat is display on label. i want to atleast display 5 seats numbers.if seats number are more than 5 then i want to display newline of that other numbers seat. so, which function i use?
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Sanjeeb LenkaRank #301 · 8.3K reputationPosted Jul 25, 2013, 5:04 AM EDT
you can try like that:
it will wrap the word when it exceed the width.
myLabel.MaximimSize = new Size(100, 0);/you can reduce the width also
myLabel.AutoSize = true;
or you can do it in property window:
Dipika Shah102 reputationPosted Jul 25, 2013, 5:35 AM EDT
VulpesRank #55 · 29.2K reputationPosted Jul 25, 2013, 7:33 AM EDT
label1.Text = "Goodbye\r\ncruel\r\nworld";
prints as:
Goodbye
cruel
world
For the ASP.NET Label control
should be used in place of \r\n.
Dipika Shah102 reputationPosted Jul 25, 2013, 7:44 AM EDT