2021r3.1 WebListbox ColumnWidths not correct widths

None of our manufacturing users need a reader at this time so it is a non issue for now, but that is exactly why the bug needs fixing or a better solution offered because this is only a temporary workaround until WebListbox.ColumnWitdths works in a consistent manor with DesktopListbox.ColumnWitdths.

Tim if you know of a better workaround for the bug in Listbox.ColumnWitdths.ColumnWitdths that prevents setting column widths for a WebListbox that has columns that will be wider than the Listbox.Width using CSS that would be a desirable outcome for me. In the interim using hidden characters is the only solution I have been able to come up with to workaround the bug.

That wasn’t intended to happen, which is why your feedback was changed to a feature request. My CSS skills aren’t up to being able to advise you on a solution. Hopefully someone with sufficient Bootstrap and CSS skill can help you.

You can use regular spaces and add this to the App HTML Header

<style>
 tr {
 white-space: pre;
 }
</style>

This code, with the above style:

creates:

Note: this could easily break if Xojo Web stops sending all the spaces to the browser.

2 Likes

Thanks again Alberto for your CSS expertise. Using a standard space as white space takes about 3 times the number of characters to equal the &u2001 - EM QUAD 1 em wide space so I’m not sure that is better in the long run but at least the white space style doesn’t interfere with the WordWrap Style. I’m working under the assumption that System fonts will always have the alternate white space characters so I will probably prefer using less characters in a workaround.

In any case, using spaces of any kind is still a kludgy workaround that doesn’t solve the ColumnWidths bug because there is so far no style setting that has been offered up by Xojo or any of the other CSS gurus on this forum to actually set a ColumnWidth that will work when the Listbox columns are larger in width than the Listbox. Until Xojo or someone can offer up a working CSS solution for setting a columns width without having to use spaces my position is this is a bug and not a feature request.