How to Right Align Text in TableView Column

XCode/Swift/OSX


I have a TableView with programmatically created columns (so can't set column properties in IDE)


I can set Right Align on the first column headerCell like this:-

myTable.tableColumns[0].headerCell.alignment = NSRightTextAlignment


But I can't figure out how to right align the contents of the data in the column.


Thanks

Ian

This is an old thread, but you can use


myTable.tableColumns[0].dataCell.alignment = NSRightTextAlignment

How to Right Align Text in TableView Column
 
 
Q