Having same amount of padding on both lines with different amounts of characters

23 Views Asked by At

I am making a Console-TUI Program using a WeatherAPI. I have designed a pretty neat UI that I like but I am having issues getting same amount of padding on both lines. Why? Because The "Location" has lets say 5 letters. And then the "Timezone" has 7 making them 2 characters apart. Currently, I am using this:

AnsiConsole.Markup($"Location: [lime]{p.Object.Location}[/]        Longitude: [paleturquoise1]{weather?.coord?.lon}[/]\nTimezone: [paleturquoise1]{weather?.timezone}[/]        Latitude: [paleturquoise1]{weather?.coord?.lat}[/]");

And it's something like this:enter image description here

I hope I can get a fix soon. Thanks!

0

There are 0 best solutions below