Question

I have followed this Wordpress tutorial which works great. I have used a listview and when i try to format the string it doesn't recognise the \t (but does recognise \n). It also won't recognise String.Format etc.

Is there anyway that I can format the string using tabs or something similar?

Cheers

EDIT

for( i = 0; i < lstView.Items.Count;i++) 
{ 
    name = lstView.Items[i].Text; 
    state = lstView.Items[i].SubItems[1].Text; 
    country = lstView.Items[i].SubItems[2].Text; 
    line += name + "\t" + state + "\t" + country + "\n"; 
}  
StringReader reader = new StringReader(line); 

When line is used to print the string is joined together so the \t doesn't work. The \n for a new line does work though. Does anyone know any way that I can format the string without using spaces.

The result is like this

NameStateCountry

LongernameStateCountry

anotherNameAnotherStateAnotherCountry

Where I would like them lined up (like in a table) with name one column, state another column and country then third

Any suggestions greatly appreciated

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top