cancel
Showing results for 
Search instead for 
Did you mean: 

new line in a cell tableview

Former Member
0 Kudos

Hi

I am trying to display some text in a cell content of a tableView.

The text contains more lines. How do I get them displayed wih new line character between them? I've tried with StringBuffer s and s.append("\n"), but all I get is only one row.

Any help greatly appreciated.

Regards

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Raluca,

You could do the following.

TableView tv = new TableView("myTableView");
//this example i am turning the encoding false on every
// cell  in column 1
tv.getColumn(1).setEncode(false);

When you pass the data to the cell you can use html tag <b><br></b> which will separate the line into two.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Prakash, thanks