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?
Sanjeeb LenkaPosted Jul 25, 2013, 9:04 AM
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 ShahPosted Jul 25, 2013, 11:44 AM
VulpesPosted Jul 25, 2013, 11:33 AM
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 ShahPosted Jul 25, 2013, 9:35 AM