Multi-line GroupBox text?

R

Ray Mitchell

Hello,

I would like the text (label) of a GroupBox control to span two lines.
Currently I can cause this to happen by simply making the GroupBox so narrow
that all the text can't fit on one line, so it wraps automatically onto the
next line(s). However, I'd like to wrap it where I want. I've tried \n and
\\n but that simply prints these characters.

Thanks,
Ray
 
R

Ray Mitchell

miher said:
Hi,

I have done this only from code, by using Environment.NewLine as line
separator.

Hope You find this useful.
-Zsolt

"Ray Mitchell" <[email protected]> az alábbiakat írta a
következő üzenetben

Very klugey, but it works! Thanks a lot for your help.
 
P

Pavel Minaev

I would like the text (label) of a GroupBox control to span two lines.  
Currently I can cause this to happen by simply making the GroupBox so narrow
that all the text can't fit on one line, so it wraps automatically onto the
next line(s).  However, I'd like to wrap it where I want.  I've tried\n and
\\n but that simply prints these characters.

Inputting "\n" in the Property Editor in the designer will actually
escape the backslash in the code... but you can open the code file
(.designer.cs), find the line setting the property, and insert a
proper "\n" there.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top