cancel
Showing results for 
Search instead for 
Did you mean: 

TableView align

Former Member
0 Kudos

Hi,

Does anybody know how can I set the alignment of the header and the column name cells of a TableView?

Tableview.setTableHAlignment aligns the data cells but not the header nor the column name cells.

I'm using a DefaultTableViewModel that contains a matrix of the data and a vector of the column names.

Amit Pick

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Amit,

Embed your column name texts inside the alignment tags in HTML.

eg. if you have a column named "Column 1" and you want to make it center aligned, instead of using the line :

vector.addElement("Column 1");

while creatinf the model, use :

vector.addElement("<center>Column 1</center>");

This will make the header center aligned.

You can also use other HTML tags like this.

Hope this helps.

Ranjith

Former Member
0 Kudos

Hi,

This worked for the column headers but it didn't work for the TableView.setHeaderText.

Any ideas?

Amit Pick

Former Member
0 Kudos

Anyone?

detlev_beutner
Active Contributor
0 Kudos

Hi Amit,

you have posted this question twice, the second posting is marked as answered. Is it still open or did you really find out by yourself?

Best regards

Detlev

Former Member
0 Kudos

Hi Detlev,

Since I haven't found a way to delete a post, I marked it as answered.

My question remains unanswered.

Amit Pick