Multi-line GroupBox text?

  • Thread starter Thread starter Ray Mitchell
  • Start date Start date
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
 
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.
 
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.
 
Back
Top