ColumnInfo.width

The default width, in pixels. As a special case, you can set this to -1 if you want the system to try to automatically size the width to fit visible content. If it can't, it will try to pick a sensible default size.

Any other negative value is not allowed and may lead to unpredictable results.

struct ColumnInfo
int width;

Bugs

It doesn't actually attempt to calculate a best-fit width on Linux as of December 3, 2021. I do plan to fix this in the future, but Windows is the priority right now. At least it doesn't break things when you use it now.

Meta

History

The -1 behavior was specified on December 3, 2021. It actually worked before anyway on Win32 but now it is a formal feature with partial Linux support.