lbTable.ColumnWidths = "120,65"
// or
lbTable.ColumnWidths = "120, 65"
and both will work and show the same result. But of course querying the property can only return one kind of string and this is the one with the space. Not a bug for me.
It’s not different. You can write and query the same way as long as you use a space after the comma. Writing the property without space after the comma is kind of a fault-tolerant version of writing with a space after the comma.
I see, so XoJo in the background is adding a space? Because in C “120,65” as a string is not the same as “120, 65”. (string meaning ASCII chars followed by ‘\0’ …of course.)
The ColumnWidth property is not a string internally. When writing to ColumnWidth the value is split by the comma, and then it sets the ListColumn.WidthExpression for each column. When red it reads all ListColumn.WidthExpression and joins them with ", ".
By the way you can also set ColumnWidth to “120, 65” and it will work.
[quote=177298:@Eli Ott]The ColumnWidth property is not a string internally. When writing to ColumnWidth the value is split by the comma, and then it sets the ListColumn.WidthExpression for each column. When red it reads all ListColumn.WidthExpression and joins them with ", ".
By the way you can also set ColumnWidth to “120, 65” and it will work.[/quote]
I precisely worked with ColumnWidths a few minutes ago, trying to position a label based on columns widths. That is when I found that ColumnWidths was still retaining the * for variablewidth columns.
I thought about using the g.Width value available in CellBackGroundPaint to get the actual value, but is there another way ?
I use constant to colomnwidth and Xojo 2016r3 doesn’t allow to enter constant ( #MyListBoxColWidth ) , but it woks with source code with constant (if we entered them in a previous version of xojo).