PDA

View Full Version : Simple way to make tabling easier in dialogs?


BlackBank
02/09/2011, 04:43 PM
So if you read the title, then you know what i talk about.

I know that you can use '\t', But if the string length is higher then 8, it will look terrible.
So what is a simple and nice methode do make this sort 'tables' (Like the HTML way).

BlackBank
02/09/2011, 04:59 PM
I have try it, and it works great. Thanks. ;)

The way i tested it:

printf("%11s %24s", "ID", "Vehicle");
printf("%11s %24s", "0", "Taxi");
printf("%11s %24s", "200", "NRG-500");
printf("%11s %24s", "13", "Hunter");


Will shows:

[18:58:55] ID Vehicle
[18:58:55] 0 Taxi
[18:58:55] 200 NRG-500
[18:58:55] 13 Hunter