prettytable-rs icon indicating copy to clipboard operation
prettytable-rs copied to clipboard

How to set an alignment for a column?

Open RazrFalcon opened this issue 7 years ago • 1 comments

AFAIU, you can set align only on a per-cell basis, but can I set an alignment for a whole column?

RazrFalcon avatar Jan 11 '18 13:01 RazrFalcon

Well, it's not currently possible, but if you have any idea in mind, feel free to make a proposal. For now you can only set alignment during row creation, or by mutably iterating over the cells in the column in order to set alignment.

Maybe some kind of method on struct Table like fn set_column_alignment(usize, Alignment) which updates all the cells would do the job

phsym avatar Jan 18 '18 20:01 phsym