java - Add new line into Eclipse's Text control field -


how can add new line eclipse's text control field?

i need open file , read it.

and works except part of content in 1 single line.

tried with:

                string scurrentline;                  br = new bufferedreader(new filereader(file));                  while ((scurrentline = br.readline()) != null) {                     system.out.println(scurrentline);                      text.settext( text.gettext() + scurrentline + "\r\n");                   } 

... still in 1 single line......

pls help!

assuming talking swt text control must create swt.multi style support multiple lines.

text = new text(parentcomposite, swt.multi); 

Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -