I’ve struggled a bit trying to get a particular column (index 0) to center from script. Here’s my code:
from javax.swing import SwingConstants ds = self.columnAttributesData for i in range(ds.rowCount) : ds = system.dataset.setValue(ds,i,"horizontalAlignment",SwingConstants.CENTER) self.columnAttributesData = ds
This seems to work for all columns except 0. I’ve worked around it by reordering some of my columns and making the one that ends up as col. 0 in that data set as a hidden one.
Another thing I’d like to be able to do is populate the table with lots of columns but initially hide them then let the user selectively show them using the pop up menus for column filtering. However, when I set columns to hidden they do not show up in the pop up menus. Is there a way to do this?
Also: When does the columnAttributesData dataset get populated. It seems I had to use the table customizer before it was populated? Is there a way to do this in script?