Width of custom label column in Table

Hi

I have a Table where I show some data. For one of the columns, I have defined a custom column generator that creates a label, fills it with data, and sets a custom style-name. The style-name is set depending on the values shown (so that I get red text for negative numbers and black for positive).

Now, it seems that the width of the column in my table is not set by how wide my widest Label is (i e the one with the most text, i e largest number). Instead it is set by the width of the table header. Therefore some parts of my Label is not shown without dragging the column sizes.

So, how can I make my table set its width from the width of my labels? Or, alternatively, is there anything else I need to do to my label or in my ColumnGenerator to stipulate how wide the Labels should be so that all the text fits?

Regards
/ Fredrik Ferm

You need to set the widths of the Labels to undefined. The default width is 100% and hence the column width is calculated by its header.