# Is there a way to disable or enable text wrapping in cells?

I am trying to generate "Program" cells but my issue is unlike "Code" cells, "Program" cells automatically start text wrapping when the line is too long for the screen. Is there an option or something to make these "Program" cells not have text wrapping so very long lines of code can go off-screen but remain in the same line like "Code" cells.

Here is an example "Program" cell:

long=StringJoin@Table[".",1000];
CellPrint@Cell[TextData[{
StyleBox["Code:",FontWeight->"Bold"],"   ",
" ... very long piece of code "<>long,"\n",
StyleBox["Comment:",FontWeight->"Bold"],
" ... very long comment ......"<>long
}], "Program"]


Here is an example "Code" cell:

CellPrint@Cell[TextData[{
StyleBox["Code:",FontWeight->"Bold"],"   ",
" ... very long piece of code "<>long,"\n",
StyleBox["Comment:",FontWeight->"Bold"],
" ... very long comment ......"<>long
}], "Code"]


long = StringJoin@Table[".", 1000];

• Thank you, it works! Weird I can't find this option in the Cell reference page but it is mentioned on the PageWidth reference page that it works with Cell. – user13892 May 23 at 2:27