Closed sepharg closed 3 years ago
any thoughts on this @khalidabuhakmeh ? if you're not able to add this maybe i can collaborate and add it myself if that's ok for you?
I would also be interested in something like this. It would also be good to have foreground colour support.
Feel free to submit a PR. Most changes are welcome and I'll help where I can 😁
Feel free to submit a PR. Most changes are welcome, and I'll help where I can 😁
Unfortunately, people are happy to use code other people wrote, but contributing to it is asking far too much. 😁
It's cool, I know folks are busy.
I recommend folks check out https://github.com/spectresystems/spectre.console.
ConsoleTables was a hobby project. Patrik has definitely done a great job and I've contributed a few ideas there. .NET OSS for the win. :)
It´d be great if you could add a background color to each row based on some property of the item, that could be defined by a delegate. For example, you add an overload that accepts a function like this
ConsoleTable.From<Item>(myResults, (item) => { item.Value > 50 ? RowBackground.Red : RowBackground.Green }).Write();
In this case rows that contain items with value bigger than 50 will be printed out with a red background, the rest with a green one.