You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It might be nice to have a convenient method to align text in a DataTable, for example to right-align numerical values, or center everything in a table.
I know that cells can contain Rich Text objects, but I just wonder if the alignment could be handled by the DataTable instead. Perhaps the alignment could be defined by column (similar to the tables in Rich)?
Textual CSS only works with widgets, so I don't think this could work with Table columns. I was thinking something more like add_column(justify="right").
Activity
[-][FEAT] Align text in a `DataTable` cell[/-][+][FEAT] Align text in a `DataTable`[/+]github-actions commentedon Nov 3, 2023
We found the following entry in the FAQ which you may find helpful:
DataTablescroll programmatically?Feel free to close this issue if you found an answer in the FAQ. Otherwise, please give us a little time to review.
This is an automated reply, generated by FAQtory
boxed commentedon Oct 26, 2024
Being able to set an id or a class on a column to apply styling rules would be nice.
TomJGooding commentedon Oct 30, 2024
Textual CSS only works with widgets, so I don't think this could work with
Tablecolumns. I was thinking something more likeadd_column(justify="right").github-actions commentedon May 31, 2026
I hope I solved your issue!
Consider sponsoring my work to continue to maintain and develop Textual.