Xojo 2025R2.1: Dynamically setting date column justification in WebListBox using Data Source

I just wanted to share the latest discovery (maybe it is obvious for everybody else), I set all columns in any WebListBox dynamically, the WebListBoxes are using Data Source, I use WebThread with that. I have stumbled across column justification issue when working with date.

Even though SQL query clearly returns c_my_date as text (COALESCE(TO_CHAR(...), '')), Xojo’s WebListBox is automatically inferring column alignment based on the column’s perceived data type — not strictly the actual data type in the query result.

Detected content Alignment
Numeric (integer, decimal) Right
Date/time-like text (YYYY-MM-DD, etc.) Right (treated as date)
Everything else Left

In order to have it left justified I had to explicitly set it as left justified using WebListBoxStyleRenderer.

That ‘feature’ was inconsistent with DesktopListBox and it will be removed in 2025r3. If you really want it right-aligned, you can use a WebListBoxStyleRenderer anyway, as you had to do.

Edit: For some more context, that’s coming from one of the DataTable’s built-in types.