textWidth for ListAttribute Class

Hello, I have noticed that while working with List COMP I often find myself in situation where adaptive column size might come handy.

Therefore having access to textWidth in List COMP would be a great addition - namely for situations where user wants to make column size adaptive (usually based on maximum textWidth of cells in given column).

Hey @monty_python,

agreed, a method on per cell basis would be useful here.
As a workaround you could keep a 1x1 px Text TOP around and feed the text plus font settings to retrieve the size via .evalTextSize(str)

Cheers
Markus

1 Like

Thanks, yeah, that should do the trick :slight_smile:

@snaut’s suggestion is exactly how I do it in lister and treeLister. That said, listCOMP is now better synced with textCOMP sizes than textDAT. I recommend setting up your size evaluator in one of those instead.

2 Likes

Good to know, thank you very much for info, I will use textCOMP as suggested.